Skip to content

Commit

Permalink
Improve documention in publish.yml, fix docker image tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Apr 10, 2021
1 parent 37c79c1 commit e1608cc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: "${{ secrets.DOCKERHUB_USERNAME }}/configurable-http-proxy:"

- name: Display tags
run: echo "Docker tags ${{ steps.gettags.outputs.tags }}"
Expand All @@ -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)) }}

0 comments on commit e1608cc

Please sign in to comment.