Skip to content

Commit c6a5b8d

Browse files
skip docker login on push
1 parent f6cd758 commit c6a5b8d

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/build-docker-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ jobs:
3939
password_secret: ${{ matrix.password_secret }}
4040
app_name: ${{ matrix.app_name }}
4141
dockerfile: ${{ matrix.dockerfile }}
42-
push: ${{ github.event_name == 'push' || github.base_ref == 'main' || github.base_ref == 'dev' || github.base_ref == 'demo' || github.base_ref == 'hotfix' }}
42+
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
4343
secrets: inherit

.github/workflows/build-docker.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232

3333
- name: Checkout
3434
uses: actions/checkout@v4
35+
36+
- name: push debug
37+
run: echo ${{ inputs.push }}
3538

3639
- name: Docker Login
3740
if: ${{ inputs.push }}
@@ -51,15 +54,15 @@ jobs:
5154
- name: Determine Tag Name Based on Branch
5255
id: determine_tag
5356
run: |
54-
if [[ "${{ github.base_ref }}" == "main" ]]; then
57+
if [[ "${{ github.ref_name }}" == "main" ]]; then
5558
echo "tagname=latest" >> $GITHUB_OUTPUT
56-
elif [[ "${{ github.base_ref }}" == "dev" ]]; then
59+
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
5760
echo "tagname=dev" >> $GITHUB_OUTPUT
58-
elif [[ "${{ github.base_ref }}" == "demo" ]]; then
61+
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
5962
echo "tagname=demo" >> $GITHUB_OUTPUT
60-
elif [[ "${{ github.base_ref }}" == "hotfix" ]]; then
63+
elif [[ "${{ github.ref_name }}" == "hotfix" ]]; then
6164
echo "tagname=hotfix" >> $GITHUB_OUTPUT
62-
elif [[ "${{ github.base_ref }}" == "dependabotchanges" ]]; then
65+
elif [[ "${{ github.ref_name }}" == "dependabotchanges" ]]; then
6366
echo "tagname=dependabotchanges" >> $GITHUB_OUTPUT
6467
else
6568
echo "tagname=default" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)