@@ -28,24 +28,29 @@ jobs:
28
28
steps :
29
29
- uses : actions/checkout@v2
30
30
31
- # Setup docker to build for multiple platforms (requires qemu).
32
- # See:
33
- # https://github.com/docker/build-push-action/tree/v2.3.0#usage
34
- # https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/multi-platform.md
31
+ # Setup docker to build for multiple platforms, see:
32
+ # https://github.com/docker/build-push-action/tree/v2.4.0#usage
33
+ # https://github.com/docker/build-push-action/blob/v2.4.0/docs/advanced/multi-platform.md
35
34
36
- - name : Set up QEMU
37
- uses : docker/setup-qemu-action@v1
35
+ - name : Set up QEMU (for docker buildx)
36
+ uses : docker/setup-qemu-action@25f0500ff22e406f7191a2a8ba8cda16901ca018 # associated tag: v1.0.2
38
37
39
- - name : Set up Docker Buildx
40
- uses : docker/setup-buildx-action@v1
38
+ - name : Set up Docker Buildx (for multi-arch builds)
39
+ uses : docker/setup-buildx-action@2a4b53665e15ce7d7049afb11ff1f70ff1610609 # associated tag: v1.1.2
41
40
42
- # https://github.com/docker/login-action/tree/v1.8.0#docker-hub
43
- - name : Login to Docker Hub
44
- uses : docker/login-action@v1
41
+ - name : Setup push rights to Docker Hub
42
+ # This was setup by...
43
+ # 1. Creating a Docker Hub service account "jupyterhubbot"
44
+ # 2. Creating a access token for the service account specific to this
45
+ # repository: https://hub.docker.com/settings/security
46
+ # 3. Making the account part of the "bots" team, and granting that team
47
+ # permissions to push to the relevant images:
48
+ # https://hub.docker.com/orgs/jupyterhub/teams/bots/permissions
49
+ # 4. Registering the username and token as a secret for this repo:
50
+ # https://github.com/jupyterhub/configurable-http-proxy/settings/secrets/actions
45
51
if : startsWith(github.ref, 'refs/tags/')
46
- with :
47
- username : ${{ secrets.DOCKERHUB_USERNAME }}
48
- password : ${{ secrets.DOCKERHUB_TOKEN }}
52
+ run : |
53
+ docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKERHUB_TOKEN }}"
49
54
50
55
# https://github.com/jupyterhub/action-major-minor-tag-calculator
51
56
# If this is a tagged build this will return additional parent tags.
56
61
# If GITHUB_TOKEN isn't available (e.g. in PRs) returns no tags [].
57
62
- name : Get list of tags
58
63
id : gettags
59
- # TODO: Move to org?
60
- uses : jupyterhub/action-major-minor-tag-calculator@main
64
+ uses : jupyterhub/action-major-minor-tag-calculator@v1
61
65
with :
62
66
githubToken : ${{ secrets.GITHUB_TOKEN }}
63
67
prefix : " jupyterhub/configurable-http-proxy:"
66
70
run : echo "Docker tags ${{ steps.gettags.outputs.tags }}"
67
71
68
72
- name : Build and push
69
- uses : docker/build-push-action@v2
73
+ uses : docker/build-push-action@e1b7f96249f2e4c8e4ac1519b9608c0d48944a1f # associated tag: v2.4.0
70
74
with :
71
75
platforms : linux/amd64,linux/arm64
72
76
push : ${{ startsWith(github.ref, 'refs/tags/') }}
0 commit comments