1
1
name : Docker
2
2
3
- # This workflow uses actions that are not certified by GitHub.
4
- # They are provided by a third-party and are governed by
5
- # separate terms of service, privacy policy, and support
6
- # documentation.
7
-
8
3
on :
9
4
schedule :
10
5
- cron : ' 25 8 * * *'
@@ -49,13 +44,19 @@ jobs:
49
44
# multi-platform images and export cache
50
45
# https://github.com/docker/setup-buildx-action
51
46
- name : Set up Docker Buildx
52
- uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
47
+ uses : docker/setup-buildx-action@v3
48
+
49
+ # Create a new builder instance
50
+ - name : Create builder
51
+ run : |
52
+ docker buildx create --use --name mybuilder
53
+ docker buildx inspect mybuilder --bootstrap
53
54
54
55
# Login against a Docker registry except on PR
55
56
# https://github.com/docker/login-action
56
57
- name : Log into registry ${{ env.REGISTRY }}
57
58
if : github.event_name != 'pull_request'
58
- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
59
+ uses : docker/login-action@v3
59
60
with :
60
61
registry : ${{ env.REGISTRY }}
61
62
username : ${{ github.actor }}
@@ -65,22 +66,23 @@ jobs:
65
66
# https://github.com/docker/metadata-action
66
67
- name : Extract Docker metadata
67
68
id : meta
68
- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
69
+ uses : docker/metadata-action@v5
69
70
with :
70
71
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71
72
72
73
# Build and push Docker image with Buildx (don't push on PR)
73
74
# https://github.com/docker/build-push-action
74
75
- name : Build and push Docker image
75
76
id : build-and-push
76
- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
77
+ uses : docker/build-push-action@v5
77
78
with :
78
79
context : .
79
80
push : ${{ github.event_name != 'pull_request' }}
80
81
tags : ${{ steps.meta.outputs.tags }}
81
82
labels : ${{ steps.meta.outputs.labels }}
82
83
cache-from : type=gha
83
84
cache-to : type=gha,mode=max
85
+ platforms : linux/amd64,linux/arm64
84
86
85
87
# Sign the resulting Docker image digest except on PRs.
86
88
# This will only write to the public Rekor transparency log when the Docker
0 commit comments