ci: build "master" container image and publish it to ghcr on every push

This commit is contained in:
Antonio Vivace
2024-09-20 16:48:42 +02:00
parent d494f73825
commit 3e28e92622

22
.github/workflows/build-container.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build Container image and publish it to GitHub Container Registry
on:
push:
branches:
- master
jobs:
publish-docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image to the GHCR
run: |
docker build . --tag ghcr.io/gbdev/rgbds:master
docker push ghcr.io/gbdev/rgbds:master