Skip to content

Commit 8975762

Browse files
author
Oleksandr Dzhychko
authored
Merge pull request #821 from modelix/dependabot/github_actions/docker/build-push-action-6
build(deps): bump docker/build-push-action from 5 to 6
2 parents 7f84b6d + af9ca25 commit 8975762

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
permissions:
1818
contents: read
1919
packages: write
20+
env:
21+
# We only push the resulting image when we are on release tag (i.e., the only time we have a push event) or on
22+
# manual request via the workflow_dispatch event.
23+
PUSH: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
2024
steps:
2125
- uses: actions/checkout@v4
2226
- uses: actions/setup-node@v4
@@ -96,6 +100,8 @@ jobs:
96100
IS_PR: ${{ github.event_name == 'pull_request' }}
97101
# Try to log in early. If this fails, there's no reason to perform the remaining steps
98102
- name: Log in to Docker Hub
103+
# Only attempt to log in if we later attempt to push.
104+
if: ${{ env.PUSH }}
99105
uses: docker/login-action@v3
100106
with:
101107
username: ${{ secrets.DOCKER_HUB_USER }}
@@ -107,11 +113,7 @@ jobs:
107113
with:
108114
platforms: linux/amd64,linux/arm64
109115
- name: Build and publish model-server Docker image
110-
uses: docker/build-push-action@v5
111-
env:
112-
# We only push the resulting image when we are on release tag (i.e., the only time we have a push event) or on
113-
# manual request via the workflow_dispatch event.
114-
PUSH: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
116+
uses: docker/build-push-action@v6
115117
with:
116118
context: ./model-server
117119
file: ./model-server/Dockerfile

0 commit comments

Comments
 (0)