diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c2174034..069ee3ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,6 +28,11 @@ jobs: steps: - uses: actions/checkout@v2 + # Setup docker to build for multiple platforms (requires qemu). + # See: + # https://github.com/docker/build-push-action/tree/v2.3.0#usage + # https://github.com/docker/build-push-action/blob/v2.3.0/docs/advanced/multi-platform.md + - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -43,13 +48,19 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} # https://github.com/manics/action-major-minor-tag-calculator-test + # If this is a tagged build this will return additional parent tags. + # E.g. 1.2.3 is expanded to Docker tags + # [{prefix}:1.2.3, {prefix}:1.2, {prefix}:1, {prefix}:latest] unless + # this is a backported tag in which case the newer tags aren't updated. + # For branches this will return the branch name. + # If GITHUB_TOKEN isn't available (e.g. in PRs) returns no tags []. - name: Get list of tags id: gettags # TODO: Move to org? uses: manics/action-major-minor-tag-calculator@main with: githubToken: ${{ secrets.GITHUB_TOKEN }} - prefix: "manics/action-major-minor-tag-calculator-test:" + prefix: "jupyterhub/configurable-http-proxy:" - name: Display tags run: echo "Docker tags ${{ steps.gettags.outputs.tags }}" @@ -59,4 +70,6 @@ jobs: with: platforms: linux/amd64,linux/arm64 push: ${{ startsWith(github.ref, 'refs/tags/') }} + # tags parameter must be a string input so convert `gettags` JSON + # array into a comma separated list of tags tags: ${{ join(fromJson(steps.gettags.outputs.tags)) }}