mirror of
https://github.com/thumbsup/thumbsup
synced 2024-11-11 07:10:26 +00:00
36 lines
1.0 KiB
YAML
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
|