diff --git a/.github/workflows/publish_docker_image.yaml b/.github/workflows/publish_docker_image.yaml new file mode 100644 index 0000000..d7d8603 --- /dev/null +++ b/.github/workflows/publish_docker_image.yaml @@ -0,0 +1,29 @@ +name: Build and Publish Playground Docker Image + +on: + push: + branches: + - main + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GH_PACKAGES_PAT }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ghcr.io/devopsplayground/chaos_engineering:latest + labels: ${{ github.sha }}