Skip to content

Commit 6adecb5

Browse files
Merge pull request #55 from microsoft/fix/skip-docker-login-on-push
fix: skip docker login on push
2 parents f6cd758 + 02ae053 commit 6adecb5

2 files changed

Lines changed: 5 additions & 7 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: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,14 @@ jobs:
5151
- name: Determine Tag Name Based on Branch
5252
id: determine_tag
5353
run: |
54-
if [[ "${{ github.base_ref }}" == "main" ]]; then
54+
if [[ "${{ github.ref_name }}" == "main" ]]; then
5555
echo "tagname=latest" >> $GITHUB_OUTPUT
56-
elif [[ "${{ github.base_ref }}" == "dev" ]]; then
56+
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
5757
echo "tagname=dev" >> $GITHUB_OUTPUT
58-
elif [[ "${{ github.base_ref }}" == "demo" ]]; then
58+
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
5959
echo "tagname=demo" >> $GITHUB_OUTPUT
60-
elif [[ "${{ github.base_ref }}" == "hotfix" ]]; then
60+
elif [[ "${{ github.ref_name }}" == "hotfix" ]]; then
6161
echo "tagname=hotfix" >> $GITHUB_OUTPUT
62-
elif [[ "${{ github.base_ref }}" == "dependabotchanges" ]]; then
63-
echo "tagname=dependabotchanges" >> $GITHUB_OUTPUT
6462
else
6563
echo "tagname=default" >> $GITHUB_OUTPUT
6664
fi

0 commit comments

Comments
 (0)