Skip to content

Commit 6a468bc

Browse files
committed
fix dockerhub password
1 parent fdf0660 commit 6a468bc

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
tag:
1414
type: string
1515
required: true
16+
secrets: # Secrets are not passed to the workflow by default
17+
DOCKERHUB_PASSWORD:
18+
required: true
1619

1720
permissions:
1821
contents: read
@@ -32,7 +35,7 @@ jobs:
3235
uses: docker/login-action@v2
3336
with:
3437
username: crenshawdotdev
35-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
38+
password: ${{ secrets.DOCKERHUB_PASSWORD || inputs.DOCKERHUB_PASSWORD }}
3639
- name: Build and push
3740
uses: docker/build-push-action@v3
3841
with:

.github/workflows/release.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
name: Create argocd-executor-plugin release
1+
name: Create release
22
on:
33
workflow_dispatch:
44
inputs:
55
tag:
66
required: true
7+
secrets:
8+
DOCKERHUB_PASSWORD:
9+
required: true
710

811
permissions:
912
contents: read
1013

1114
jobs:
12-
build-and-push:
13-
uses: crenshaw-dev/argocd-executor-plugin/.github/workflows/build.yaml@main
14-
with:
15-
tag: ${{ github.event.inputs.tag }}
16-
if: github.repository == 'crenshaw-dev/argocd-executor-plugin'
1715
prepare-release:
1816
permissions:
1917
contents: write # To push changes to release branch
@@ -25,6 +23,12 @@ jobs:
2523
GIT_EMAIL: [email protected]
2624
RELEASE_TAG: ${{ github.event.inputs.tag }}
2725
steps:
26+
- uses: crenshaw-dev/argocd-executor-plugin/.github/workflows/build.yaml@main
27+
with:
28+
tag: ${{ github.event.inputs.tag }}
29+
secrets:
30+
DOCKERHUB_PASSWORD: ${{ github.event.secrets.DOCKERHUB_PASSWORD }}
31+
if: github.repository == 'crenshaw-dev/argocd-executor-plugin'
2832
- name: Checkout code
2933
uses: actions/checkout@v3
3034
with:
@@ -39,7 +43,7 @@ jobs:
3943
git config --global user.name "${GIT_USERNAME}"
4044
4145
git tag ${RELEASE_TAG}
42-
git push origin ${RELEASE_TAG}
46+
git push origin ${RELEASE_TAG} --force
4347
4448
- name: Create GitHub release
4549
uses: softprops/action-gh-release@v1
@@ -49,3 +53,5 @@ jobs:
4953
name: ${{ env.RELEASE_TAG }}
5054
tag_name: ${{ env.RELEASE_TAG }}
5155
generate_release_notes: true
56+
body: |
57+
Test.

0 commit comments

Comments
 (0)