You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thumbsup/.github/workflows/publish-docker.yml

36 lines
1.0 KiB
YAML

name: Publish Docker image
on:
workflow_dispatch:
workflow_run:
workflows: ["Publish NPM package"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- id: version
name: Fetch latest NPM version
run: echo ::set-output name=version::$(npm show thumbsup version)
- name: Publish Docker image
uses: docker/build-push-action@v2
with:
context: docker
file: ./docker/Dockerfile.release
build-args: PACKAGE_VERSION=${{ steps.version.outputs.version }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/thumbsup/thumbsup:${{ steps.version.outputs.version }}
ghcr.io/thumbsup/thumbsup:latest
push: true