Set unchained version #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Images to GHCR | |
env: | |
NODE_VERSION: "20.10" | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- docker | |
jobs: | |
push-store-image: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "." | |
steps: | |
- name: "Checkout GitHub Action" | |
uses: actions/checkout@main | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: "Login to GitHub Container Registry" | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/[email protected] | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
ghcr.io/kenshitech/unchained:latest | |
ghcr.io/kenshitech/unchained:v${{ steps.package-version.outputs.current-version }} | |
build-args: | | |
NODE_VERSION=${{ env.NODE_VERSION }} | |
UNCHAINED_VERSION=${{ steps.package-version.outputs.current-version }} |