Fix runner image workflow: lowercase owner and GHCR push #2
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 & Push Runner Image | |
| on: | |
| push: | |
| branches: | |
| - week02-devops | |
| paths: | |
| - "runner/**" | |
| - ".github/workflows/runner-image.yml" | |
| jobs: | |
| build-runner: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to GHCR | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Set image owner (lowercase) | |
| run: echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV | |
| - name: Build runner image | |
| run: | | |
| docker build \ | |
| -t ghcr.io/$OWNER/nebula-runner:latest \ | |
| ./runner | |
| - name: Push runner image | |
| run: | | |
| docker push ghcr.io/$OWNER/nebula-runner:latest |