Skip to content

Commit fe8f447

Browse files
committed
Update reusable workflow to use secrets input
1 parent 75789b9 commit fe8f447

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

.github/workflows/on-push-to-main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ jobs:
1111
with:
1212
branch: main
1313
tag: latest
14-
docker_username: ${{ secrets.DOCKER_USERNAME }}
15-
docker_password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
14+
secrets: inherit

.github/workflows/on-push-to-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ jobs:
1111
with:
1212
branch: test
1313
tag: test
14-
docker_username: ${{ secrets.DOCKER_USERNAME }}
15-
docker_password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
14+
secrets: inherit

.github/workflows/publish-ffxivvenues-web-client.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,11 @@ on:
2323
required: true
2424
type: string
2525
default: latest
26+
secrets:
2627
docker_username:
2728
required: true
28-
type: string
2929
docker_password:
3030
required: true
31-
type: string
32-
33-
env:
34-
DOCKER_USERNAME: ${{ inputs.docker_username || secrets.DOCKER_USERNAME }}
35-
DOCKER_ACCESS_TOKEN: ${{ inputs.docker_password || secrets.DOCKER_ACCESS_TOKEN }}
3631

3732
jobs:
3833
publish_for_platforms:
@@ -59,11 +54,11 @@ jobs:
5954
- name: Docker Login
6055
uses: docker/login-action@v2.0.0
6156
with:
62-
username: ${{ env.DOCKER_USERNAME }}
63-
password: ${{ env.DOCKER_ACCESS_TOKEN}}
57+
username: ${{ secrets.DOCKER_USERNAME }}
58+
password: ${{ secrets.DOCKER_ACCESS_TOKEN}}
6459

6560
- name: Build and push docker image
66-
run: docker build --push --platform ${{ matrix.platform }} -t ${{ env.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-${{matrix.tag}} ./
61+
run: docker build --push --platform ${{ matrix.platform }} -t ${{ secrets.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-${{ matrix.tag }} ./
6762

6863
publish_multiplatform_manifest:
6964
name: Publish multiplatform manifest
@@ -73,11 +68,11 @@ jobs:
7368
- name: Docker Login
7469
uses: docker/login-action@v2.0.0
7570
with:
76-
username: ${{ env.DOCKER_USERNAME }}
77-
password: ${{ env.DOCKER_ACCESS_TOKEN}}
71+
username: ${{ secrets.DOCKER_USERNAME }}
72+
password: ${{ secrets.DOCKER_ACCESS_TOKEN}}
7873

7974
- name: Create and push manifest
8075
run: |
81-
docker buildx imagetools create -t ${{ env.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }} \
82-
${{ env.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-amd64 \
83-
${{ env.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-arm64
76+
docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }} \
77+
${{ secrets.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-amd64 \
78+
${{ secrets.DOCKER_USERNAME }}/ffxivvenues.web:${{ inputs.tag }}-arm64

0 commit comments

Comments
 (0)