Skip to content

Merge pull request #22 from vasgat/main #4

Merge pull request #22 from vasgat/main

Merge pull request #22 from vasgat/main #4

Workflow file for this run

name: Build and publish Docker image
on:
push:
branches: [ main, staging ]
paths:
- 'dist/**'
- 'docker/**'
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value={{sha}}
- name: Build and push Docker image
uses: docker/[email protected]
with:
push: true
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}