init ci
Some checks failed
Build and Push Docker image to GHCR / build-and-push (push) Has been cancelled

This commit is contained in:
Loïc Pinçon 2025-06-04 12:01:33 +02:00
parent 4256fba3a0
commit ddd1be860d

30
.github/workflows/merge-main.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Build and Push Docker image to GHCR
on:
push:
branches: [ integrate-ci ]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Extract repo name
id: meta
run: echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Build Docker image
run: docker build -t ghcr.io/${{ github.repository_owner }}/$REPO:latest .
- name: Push Docker image
run: docker push ghcr.io/${{ github.repository_owner }}/$REPO:latest