Skip to content

Commit e9588f3

Browse files
committed
Fix deploy
- Default REGISTRY to docker.io for releases - Create separate job for update docker README
1 parent 08ce92d commit e9588f3

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
env:
1919
DEFAULT_JAVA_VERSION: 17
2020
DEFAULT_JAVA_TYPE: jre
21+
REGISTRY: docker.io
2122

2223
jobs:
2324
create-variables:
@@ -36,6 +37,7 @@ jobs:
3637
with:
3738
ref: ${{ github.event.workflow_run.head_branch }}
3839
- name: Update the registry
40+
if: ${{ github.event.inputs.registry != '' }}
3941
run: echo "REGISTRY=${{ github.event.inputs.registry }}" >> $GITHUB_ENV
4042
- name: Set up JDK 17
4143
uses: actions/setup-java@v4
@@ -115,9 +117,21 @@ jobs:
115117
-PdockerTags=$DOCKER_TAGS
116118
--imageName=$IMAGE:$CLOUD_CONFIG_BUILD_VERSION-$SHORT_SHA-$JAVA
117119
--publishImage
118-
- name: Update Docker Hub README
119-
if: env.REGISTRY == 'docker.io'
120-
uses: meeDamian/[email protected]
120+
121+
update-docker-hub-description:
122+
name: Update Docker Hub README
123+
needs:
124+
- create-variables
125+
- build-and-deploy-to-registry
126+
if: needs.create-variables.outputs.registry == 'docker.io'
127+
runs-on: ubuntu-latest
128+
steps:
129+
- name: Checkout
130+
uses: actions/checkout@v4
131+
with:
132+
ref: ${{ github.event.workflow_run.head_branch }}
133+
- name: Docker Hub Description
134+
uses: peter-evans/dockerhub-description@v4
121135
with:
122-
pass: ${{ secrets.DOCKER_PASS }}
123-
description: true
136+
username: ${{ secrets.DOCKERHUB_USERNAME }}
137+
password: ${{ secrets.DOCKERHUB_TOKEN }}

0 commit comments

Comments
 (0)