platform/.github/workflows/build.yml
Chris Anderson db83ff9ea6
Tags docker build with release tag (#122)
Co-authored-by: Chris Hills <31041837+chrishills@users.noreply.github.com>
2023-04-12 07:56:21 -05:00

36 lines
785 B
YAML

name: Create & Publish Docker Image
on:
push:
tags:
- "v*.*.*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log In to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker Image
run: |
npm run docker:build:push --tag=$(echo ${GITHUB_REF_NAME:1})