Skip to content

Commit e193b4c

Browse files
fix(docker): move update dockerhub readme to separate job
1 parent 9e4ccf8 commit e193b4c

1 file changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/__call-docker.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,16 @@ jobs:
105105
echo $matrix
106106
echo $matrix | jq .
107107
echo "matrix=$matrix" >> $GITHUB_OUTPUT
108+
- name: Additional Outputs
109+
id: additional_outputs
110+
run: |
111+
# set outputs for later jobs
112+
REPOSITORY=${{ github.repository }}
113+
BASE_TAG=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]')
114+
echo "base_tag=${BASE_TAG}" >> $GITHUB_OUTPUT
108115
109116
outputs:
117+
base_tag: ${{ steps.additional_outputs.outputs.base_tag }}
110118
dockerfiles: ${{ steps.find.outputs.dockerfiles }}
111119
matrix: ${{ steps.find.outputs.matrix }}
112120

@@ -167,8 +175,7 @@ jobs:
167175
fi
168176
169177
# setup the tags
170-
REPOSITORY=${{ github.repository }}
171-
BASE_TAG=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]')
178+
BASE_TAG="${{ needs.check_dockerfiles.outputs.base_tag }}"
172179
173180
TAGS="${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }},ghcr.io/${BASE_TAG}:${COMMIT:0:7}${{ matrix.tag }}"
174181
@@ -313,14 +320,28 @@ jobs:
313320
path: artifacts/
314321
if-no-files-found: error
315322

323+
release:
324+
name: Release
325+
if: >
326+
github.event_name == 'push' &&
327+
github.ref == 'refs/heads/master'
328+
runs-on: ubuntu-latest
329+
needs:
330+
- check_dockerfiles
331+
- docker
332+
steps:
333+
- name: Checkout
334+
uses: actions/checkout@v4
335+
with:
336+
sparse-checkout: |
337+
DOCKER_README.md
338+
sparse-checkout-cone-mode: false
339+
316340
- name: Update Docker Hub Description
317-
if: >
318-
github.event_name == 'push' &&
319-
github.ref == 'refs/heads/master'
320341
uses: peter-evans/dockerhub-description@v4
321342
with:
322343
username: ${{ secrets.DOCKER_HUB_USERNAME }}
323344
password: ${{ secrets.DOCKER_HUB_PASSWORD }} # token is not currently supported
324-
repository: ${{ env.BASE_TAG }}
345+
repository: ${{ needs.check_dockerfiles.outputs.base_tag }}
325346
short-description: ${{ github.event.repository.description }}
326347
readme-filepath: ./DOCKER_README.md

0 commit comments

Comments
 (0)