Skip to content

Merge pull request #17 from sensebox/feat/github-action #1

Merge pull request #17 from sensebox/feat/github-action

Merge pull request #17 from sensebox/feat/github-action #1

Workflow file for this run

name: Build and Publish Docker Image to GHCR
on:
push:
tags:
- "v*" # Triggers on version tags like v1.0.0
workflow_dispatch: # Allow manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/react-ardublockly-backend:latest
ghcr.io/${{ github.repository_owner }}/react-ardublockly-backend:${{ github.ref_name }}