Skip to content

Merge pull request #3 from vasgat/staging #3

Merge pull request #3 from vasgat/staging

Merge pull request #3 from vasgat/staging #3

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/checkout@v4.2.2
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value={{sha}}
- name: Build and push Docker image
uses: docker/build-push-action@v6.9.0
with:
push: true
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}