Skip to content

Commit faa952f

Browse files
committed
ci: improve build
1 parent ca69ce2 commit faa952f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,29 @@ jobs:
3232
- name: Checkout repository
3333
uses: actions/checkout@v2
3434

35-
# Login against a Docker registry except on PR
36-
# https://github.com/docker/login-action
3735
- name: Log into registry ${{ env.REGISTRY }}
3836
if: github.event_name != 'pull_request'
39-
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
37+
uses: docker/login-action@v1
4038
with:
4139
registry: ${{ env.REGISTRY }}
4240
username: ${{ github.actor }}
4341
password: ${{ secrets.CR_PAT }}
4442

45-
# Extract metadata (tags, labels) for Docker
46-
# https://github.com/docker/metadata-action
4743
- name: Extract Docker metadata
4844
id: meta
49-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
45+
uses: docker/metadata-action@v3
5046
with:
5147
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5248

53-
# Build and push Docker image with Buildx (don't push on PR)
54-
# https://github.com/docker/build-push-action
49+
- name: Set up Docker Buildx
50+
uses: docker/setup-buildx-action@v1
51+
5552
- name: Build and push Docker image
56-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
53+
uses: docker/build-push-action@v2
5754
with:
5855
context: .
5956
push: ${{ github.event_name != 'pull_request' }}
6057
tags: ${{ steps.meta.outputs.tags }}
6158
labels: ${{ steps.meta.outputs.labels }}
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)