neiam
/mutant-operator
An Experimental Operator
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
ghcr
f7ebc55 · gmorell · 2025-05-07 12:04
Files changed
added
.github/workflows/docker-build-push.yml
+34
−0
@@ -0,0 +1,34 @@
| 1 | +name: Build and Push Docker Image | |
| 2 | + | |
| 3 | +on: | |
| 4 | + push: | |
| 5 | + branches: | |
| 6 | + - master | |
| 7 | + | |
| 8 | +env: | |
| 9 | + REGISTRY: ghcr.io | |
| 10 | + IMAGE_NAME: neiam/mutant-operator | |
| 11 | + | |
| 12 | +jobs: | |
| 13 | + build-and-push: | |
| 14 | + runs-on: ubuntu-latest | |
| 15 | + | |
| 16 | + steps: | |
| 17 | + - name: Checkout code | |
| 18 | + uses: actions/checkout@v3 | |
| 19 | + | |
| 20 | + - name: Login to GitHub Container Registry | |
| 21 | + uses: docker/login-action@v2 | |
| 22 | + with: | |
| 23 | + registry: ${{ env.REGISTRY }} | |
| 24 | + username: ${{ github.actor }} | |
| 25 | + password: ${{ secrets.GITHUB_TOKEN }} | |
| 26 | + | |
| 27 | + - name: Build and push Docker image | |
| 28 | + uses: docker/build-push-action@v4 | |
| 29 | + with: | |
| 30 | + context: . | |
| 31 | + push: true | |
| 32 | + tags: | | |
| 33 | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| 34 | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
Parents: ba49bfc