Skip to content

Fix runner image workflow: lowercase owner and GHCR push #2

Fix runner image workflow: lowercase owner and GHCR push

Fix runner image workflow: lowercase owner and GHCR push #2

Workflow file for this run

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