diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml new file mode 100644 index 0000000..ec48cbd --- /dev/null +++ b/.github/workflows/docker-build-publish.yml @@ -0,0 +1,38 @@ +name: Docker Build and Publish +on: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +permissions: + contents: write + packages: write + +jobs: + build: + if: ${{ github.actor != 'dependabot'}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 + - name: Log in to the Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Push Docker Image + if: ${{ success() }} + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main + platforms: linux/amd64 + provenance: false + sbom: false \ No newline at end of file