Update build.yaml #16
Workflow file for this run
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
| on: | |
| push: | |
| branches: | |
| - redeploy-2025.1.0-to-ghcr | |
| jobs: | |
| container-image: | |
| name: 'Build container image' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: 'Extract turnierplan.NET version' | |
| shell: pwsh | |
| run: | | |
| $Version = "2025.1.0 | |
| Write-Host $Version | |
| Add-Content -Path $env:GITHUB_ENV -Value "TURNIERPLAN_APPLICATION_VERSION=$Version" | |
| working-directory: './src' | |
| - name: 'Replace environment tokens' | |
| uses: cschleiden/replace-tokens@v1 | |
| with: | |
| files: '["**/environment.prod.ts"]' | |
| env: | |
| TOKEN_APPLICATION_VERSION: "${{ env.TURNIERPLAN_APPLICATION_VERSION }}" | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 'Build and push container image' | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: ./src | |
| file: ./src/Turnierplan.App/Dockerfile | |
| push: true | |
| tags: 'ghcr.io/turnierplan-net/turnierplan:latest,ghcr.io/turnierplan-net/turnierplan:${{ env.TURNIERPLAN_APPLICATION_VERSION }}' |