detached ce7d45e

Fix deploy action tags and docs

commit
ce7d45edd03f743eaf130538a18d8a11b16fc5be
author
bnema · · 2026-01-13 21:19 UTC
parent
b462a18
signature
unsigned
4 files · +27 -7
M .github/actions/deploy/README.md +2 -0
@@ -85,6 +85,7 @@ jobs:
8585 | `username` | Registry username (token subject for token auth) | Yes | - |
8686 | `password` | Registry password or token | Yes | - |
8787 | `image` | Image name | No | Repository name |
88+| `tag` | Override image tag | No | Git tag or short SHA |
8889 | `dockerfile` | Path to Dockerfile | No | `./Dockerfile` |
8990 | `context` | Build context path | No | `.` |
9091 | `build-args` | Build arguments (one per line) | No | - |
@@ -163,6 +164,7 @@ jobs:
163164 registry: registry.mydomain.com
164165 username: ${{ secrets.GORDON_USERNAME }}
165166 password: ${{ secrets.GORDON_TOKEN }}
167+ tag: ${{ github.event.inputs.tag }}
166168 ```
167169
168170 ### Monorepo with Multiple Services
@@ -85,6 +85,7 @@ jobs:
85 | `username` | Registry username (token subject for token auth) | Yes | - |85 | `username` | Registry username (token subject for token auth) | Yes | - |
86 | `password` | Registry password or token | Yes | - |86 | `password` | Registry password or token | Yes | - |
87 | `image` | Image name | No | Repository name |87 | `image` | Image name | No | Repository name |
88+| `tag` | Override image tag | No | Git tag or short SHA |
88 | `dockerfile` | Path to Dockerfile | No | `./Dockerfile` |89 | `dockerfile` | Path to Dockerfile | No | `./Dockerfile` |
89 | `context` | Build context path | No | `.` |90 | `context` | Build context path | No | `.` |
90 | `build-args` | Build arguments (one per line) | No | - |91 | `build-args` | Build arguments (one per line) | No | - |
@@ -163,6 +164,7 @@ jobs:
163 registry: registry.mydomain.com164 registry: registry.mydomain.com
164 username: ${{ secrets.GORDON_USERNAME }}165 username: ${{ secrets.GORDON_USERNAME }}
165 password: ${{ secrets.GORDON_TOKEN }}166 password: ${{ secrets.GORDON_TOKEN }}
167+ tag: ${{ github.event.inputs.tag }}
166 ```168 ```
167 169
168 ### Monorepo with Multiple Services170 ### Monorepo with Multiple Services
M .github/actions/deploy/action.yml +23 -6
@@ -20,6 +20,10 @@ inputs:
2020 description: 'Image name (defaults to repository name)'
2121 required: false
2222 default: ''
23+ tag:
24+ description: 'Override image tag (defaults to git tag or short SHA)'
25+ required: false
26+ default: ''
2327 dockerfile:
2428 description: 'Path to Dockerfile (defaults to ./Dockerfile)'
2529 required: false
@@ -81,11 +85,13 @@ runs:
8185 IMAGE_NAME="${GITHUB_REPOSITORY#*/}"
8286 fi
8387
84- # Extract tag from ref
85- if [[ "$GITHUB_REF" == refs/tags/* ]]; then
88+ # Extract tag from ref (or override)
89+ if [[ -n "${{ inputs.tag }}" ]]; then
90+ TAG="${{ inputs.tag }}"
91+ elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
8692 TAG="${GITHUB_REF#refs/tags/}"
8793 else
88- TAG="$(echo $GITHUB_SHA | head -c 7)"
94+ TAG="$(echo "$GITHUB_SHA" | head -c 7)"
8995 fi
9096
9197 # Full image reference
@@ -98,6 +104,9 @@ runs:
98104
99105 echo "Building: ${FULL_IMAGE}"
100106
107+ - name: Set up QEMU
108+ uses: docker/setup-qemu-action@v3
109+
101110 - name: Set up Docker Buildx
102111 uses: docker/setup-buildx-action@v3
103112
@@ -108,6 +117,16 @@ runs:
108117 username: ${{ inputs.username }}
109118 password: ${{ inputs.password }}
110119
120+ - name: Build tags
121+ id: tags
122+ shell: bash
123+ run: |
124+ TAGS="${{ steps.meta.outputs.image }}"
125+ if [[ "${{ inputs.push-latest }}" == "true" ]]; then
126+ TAGS="${TAGS}"$'\n'"${{ inputs.registry }}/${{ steps.meta.outputs.image_name }}:latest"
127+ fi
128+ printf "tags<<EOF\n%s\nEOF\n" "$TAGS" >> "$GITHUB_OUTPUT"
129+
111130 - name: Build and push
112131 id: push
113132 uses: docker/build-push-action@v6
@@ -117,9 +136,7 @@ runs:
117136 context: ${{ inputs.context }}
118137 file: ${{ inputs.dockerfile }}
119138 push: true
120- tags: |
121- ${{ steps.meta.outputs.image }}
122- ${{ inputs.push-latest == 'true' && format('{0}/{1}:latest', inputs.registry, steps.meta.outputs.image_name) || '' }}
139+ tags: ${{ steps.tags.outputs.tags }}
123140 build-args: ${{ inputs.build-args }}
124141 platforms: ${{ inputs.platforms }}
125142 cache-from: ${{ inputs.cache-from }}
@@ -20,6 +20,10 @@ inputs:
20 description: 'Image name (defaults to repository name)'20 description: 'Image name (defaults to repository name)'
21 required: false21 required: false
22 default: ''22 default: ''
23+ tag:
24+ description: 'Override image tag (defaults to git tag or short SHA)'
25+ required: false
26+ default: ''
23 dockerfile:27 dockerfile:
24 description: 'Path to Dockerfile (defaults to ./Dockerfile)'28 description: 'Path to Dockerfile (defaults to ./Dockerfile)'
25 required: false29 required: false
@@ -81,11 +85,13 @@ runs:
81 IMAGE_NAME="${GITHUB_REPOSITORY#*/}"85 IMAGE_NAME="${GITHUB_REPOSITORY#*/}"
82 fi86 fi
83 87
84- # Extract tag from ref88+ # Extract tag from ref (or override)
85- if [[ "$GITHUB_REF" == refs/tags/* ]]; then89+ if [[ -n "${{ inputs.tag }}" ]]; then
90+ TAG="${{ inputs.tag }}"
91+ elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
86 TAG="${GITHUB_REF#refs/tags/}"92 TAG="${GITHUB_REF#refs/tags/}"
87 else93 else
88- TAG="$(echo $GITHUB_SHA | head -c 7)"94+ TAG="$(echo "$GITHUB_SHA" | head -c 7)"
89 fi95 fi
90 96
91 # Full image reference97 # Full image reference
@@ -98,6 +104,9 @@ runs:
98 104
99 echo "Building: ${FULL_IMAGE}"105 echo "Building: ${FULL_IMAGE}"
100 106
107+ - name: Set up QEMU
108+ uses: docker/setup-qemu-action@v3
109+
101 - name: Set up Docker Buildx110 - name: Set up Docker Buildx
102 uses: docker/setup-buildx-action@v3111 uses: docker/setup-buildx-action@v3
103 112
@@ -108,6 +117,16 @@ runs:
108 username: ${{ inputs.username }}117 username: ${{ inputs.username }}
109 password: ${{ inputs.password }}118 password: ${{ inputs.password }}
110 119
120+ - name: Build tags
121+ id: tags
122+ shell: bash
123+ run: |
124+ TAGS="${{ steps.meta.outputs.image }}"
125+ if [[ "${{ inputs.push-latest }}" == "true" ]]; then
126+ TAGS="${TAGS}"$'\n'"${{ inputs.registry }}/${{ steps.meta.outputs.image_name }}:latest"
127+ fi
128+ printf "tags<<EOF\n%s\nEOF\n" "$TAGS" >> "$GITHUB_OUTPUT"
129+
111 - name: Build and push130 - name: Build and push
112 id: push131 id: push
113 uses: docker/build-push-action@v6132 uses: docker/build-push-action@v6
@@ -117,9 +136,7 @@ runs:
117 context: ${{ inputs.context }}136 context: ${{ inputs.context }}
118 file: ${{ inputs.dockerfile }}137 file: ${{ inputs.dockerfile }}
119 push: true138 push: true
120- tags: |139+ tags: ${{ steps.tags.outputs.tags }}
121- ${{ steps.meta.outputs.image }}
122- ${{ inputs.push-latest == 'true' && format('{0}/{1}:latest', inputs.registry, steps.meta.outputs.image_name) || '' }}
123 build-args: ${{ inputs.build-args }}140 build-args: ${{ inputs.build-args }}
124 platforms: ${{ inputs.platforms }}141 platforms: ${{ inputs.platforms }}
125 cache-from: ${{ inputs.cache-from }}142 cache-from: ${{ inputs.cache-from }}
M .github/dependabot.yml +1 -1
@@ -5,7 +5,7 @@
55
66 version: 2
77 updates:
8- - package-ecosystem: "" # See documentation for possible values
8+ - package-ecosystem: "gomod" # See documentation for possible values
99 directory: "/" # Location of package manifests
1010 schedule:
1111 interval: "weekly"
@@ -5,7 +5,7 @@
5 5
6 version: 26 version: 2
7 updates:7 updates:
8- - package-ecosystem: "" # See documentation for possible values8+ - package-ecosystem: "gomod" # See documentation for possible values
9 directory: "/" # Location of package manifests9 directory: "/" # Location of package manifests
10 schedule:10 schedule:
11 interval: "weekly"11 interval: "weekly"
M examples/github-workflow.yml +1 -0
@@ -48,6 +48,7 @@ jobs:
4848 registry: ${{ secrets.GORDON_REGISTRY }}
4949 username: ${{ secrets.GORDON_USERNAME }}
5050 password: ${{ secrets.GORDON_TOKEN }}
51+ tag: ${{ github.event.inputs.tag }}
5152 # Optional customizations:
5253 # image: myapp # Custom image name (defaults to repo name)
5354 # dockerfile: ./Dockerfile # Custom Dockerfile path
@@ -48,6 +48,7 @@ jobs:
48 registry: ${{ secrets.GORDON_REGISTRY }}48 registry: ${{ secrets.GORDON_REGISTRY }}
49 username: ${{ secrets.GORDON_USERNAME }}49 username: ${{ secrets.GORDON_USERNAME }}
50 password: ${{ secrets.GORDON_TOKEN }}50 password: ${{ secrets.GORDON_TOKEN }}
51+ tag: ${{ github.event.inputs.tag }}
51 # Optional customizations:52 # Optional customizations:
52 # image: myapp # Custom image name (defaults to repo name)53 # image: myapp # Custom image name (defaults to repo name)
53 # dockerfile: ./Dockerfile # Custom Dockerfile path54 # dockerfile: ./Dockerfile # Custom Dockerfile path

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close