Merge pull request #17 from sensebox/feat/github-action #1
Workflow file for this run
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: 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 }} |