diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..614764d --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,38 @@ +name: Publish Docker image + +on: push + +jobs: + publish-images: + name: Publish Docker Images + runs-on: ubuntu-latest + steps: + - + name: Check out repo + uses: actions/checkout@v4 + + - + name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }} + + - + name: Login to GitHub Packages + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - + name: Build and push Docker image + id: push + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}