Build Builder Docker image #74
This file contains 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 Builder Docker image | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "builder/**" | |
- ".github/workflows/build-builder.yml" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to GitHub Container Registry | |
if: ${{ (github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')) }} | |
run: | | |
echo $GITHUB_TOKEN | docker login ghcr.io -u SteamDeckHomebrew --password-stdin | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: | | |
cd builder | |
docker build -t ghcr.io/steamdeckhomebrew/builder:latest . | |
- name: Wait for other runs to complete | |
uses: softprops/turnstyle@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push | |
if: ${{ (github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')) }} | |
run: | | |
docker push ghcr.io/steamdeckhomebrew/builder:latest | |
- name: Log out of GitHub Container Registry | |
run: | | |
docker logout ghcr.io |