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