diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..8c5cfc3 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,32 @@ +name: Deploy Images to GHCR + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + push-store-image: + runs-on: ubuntu-latest + defaults: + run: + working-directory: "./Store" + steps: + - name: "Checkout GitHub Action" + uses: actions/checkout@main + + - 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" + uses: docker/build-push-action@v2 + with: + context: . + file: ./Store/Dockerfile + push: true + tags: ghcr.io/${{github.repository}}/store:latest