Skip to content

Commit

Permalink
fix(cd): auth on dockerhub
Browse files Browse the repository at this point in the history
Signed-off-by: WoodenMaiden <[email protected]>
  • Loading branch information
WoodenMaiden committed Aug 26, 2024
1 parent 6442de5 commit 51e57df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
sha_short: ${{ steps.variables.outputs.sha_short }}
build_date: ${{ steps.variables.outputs.build_date }}
no_v: ${{ steps.set_version.outputs.no_v }}
docker_hub_user: ${{ steps.set_version.outputs.docker_hub_user }}


steps:
- name: Clone project
Expand All @@ -35,11 +33,6 @@ jobs:
const no_v = tag.replace('v', '')
core.setOutput('no_v', no_v)
core.setSecret('myPassword'); //hides the username
const docker_hub_user = '${{ secrets.DOCKER_HUB_USER }}'
core.setOutput('docker_hub_user', docker_hub_user)
publish_helm:
needs: variables
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,9 +60,6 @@ jobs:
password: GITHUB_TOKEN
- target: docker
repo: agroldapp
username: ${{ needs.variables.outputs.docker_hub_user }}
password: DOCKER_HUB_PASSWORD

steps:
- uses: actions/checkout@v4

Expand All @@ -78,7 +68,15 @@ jobs:
with:
version: latest

- name: Login to ghcr.io
- name: Login to the DockerHub
if: ${{ matrix.target == 'docker' }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Login to ${{ matrix.target }}
if: ${{ matrix.target != 'docker' }}
uses: docker/[email protected]
with:
registry: ${{ matrix.registry }}
Expand Down Expand Up @@ -110,7 +108,8 @@ jobs:
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeScopes: cicd,ci,cd,
excludeScopes: cicd,ci,cd
excludeTypes: build,docs,other,style
writeToFile: false
useGitmojis: true
includeInvalidCommits: true
Expand Down
2 changes: 1 addition & 1 deletion agrold-javaweb/charts/agrold-javaweb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ extraDeploy: []
image:
registry: docker.io
repository: agroldapp/agrold
tag: 2.1.1
tag: 2.3.0
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
Expand Down

0 comments on commit 51e57df

Please sign in to comment.