mirror of https://github.com/thumbsup/thumbsup
chore: Github workflow to publish the Docker image
parent
f652d663cb
commit
2a0d1b5b93
@ -0,0 +1,41 @@
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
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
|
||||
tags: |
|
||||
ghcr.io/thumbsup/thumbsup:${{ steps.version.outputs.version }}
|
||||
ghcr.io/thumbsup/thumbsup:latest
|
||||
push: true
|
Loading…
Reference in New Issue