pull from right branch #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build minecraft.runsafe.no | |
| concurrency: | |
| group: helm-values-update | |
| cancel-in-progress: false | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "email-templates/**" | |
| - "engine/**" | |
| - "KrameWork/**" | |
| - "modules/**" | |
| - "templates/**" | |
| - "minecraft/**" | |
| - "Dockerfile.minecraft" | |
| - ".github/workflows/build-minecraft.yaml" | |
| permissions: | |
| contents: write | |
| packages: write | |
| env: | |
| IMAGE_NAME: ghcr.io/runsafe/web-minecraft | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile.minecraft | |
| push: true | |
| tags: | | |
| ${{ env.IMAGE_NAME }}:latest | |
| ${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| - name: Install yq | |
| uses: mikefarah/yq@v4 | |
| - name: Update Helm values | |
| run: | | |
| yq -i '.images.minecraft.tag = "${{ github.sha }}"' charts/runsafe/values.yaml | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add charts/runsafe/values.yaml | |
| git commit -m "Update minecraft image to ${{ github.sha }}" | |
| git pull --rebase origin master | |
| git push |