From ac2f83c0612a9e296bfe7368f521165f0a70ee31 Mon Sep 17 00:00:00 2001 From: machka Date: Sun, 18 May 2025 08:10:01 +0000 Subject: [PATCH] Add GitHub Actions workflow to build & publish Docker image --- .github/workflows/docker-publish.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..780cc10 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,37 @@ +name: Build and Publish Docker Image + +on: + push: + branches: + - main + tags: + - 'v*.*.*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ghcr.io/${{ github.repository }}:latest