Skip to content

[release] fix docker image builder #40

[release] fix docker image builder

[release] fix docker image builder #40

Workflow file for this run

name: Build Docker Image
# Cancel the current workflow when new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
# Release on any git tag
on:
push:
tags: ['*']
jobs:
build:
runs-on: [self-hosted, linux, nixos]
strategy:
fail-fast: false
matrix:
config:
- blastoise
steps:
- uses: actions/checkout@v4
with:
# Checkout the triggered tag name
ref: ${{ github.ref_name }}
- name: Build docker image file
env:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
run: |
export PATH="$(nix build '.#skopeo.out' --print-out-paths --no-link)/bin:$PATH"
export PATH="$(nix build '.#gzip.out' --print-out-paths --no-link)/bin:$PATH"
closure="$(nix build -L '.#t1.${{ matrix.config }}.t1emu.docker-image' --no-link --print-out-paths --impure)"
skopeo login --username "$username" --password "$password" "$registry"
"$closure" \
| gzip --fast \
| skopeo copy docker-archive:/dev/stdin docker://"$registry"/chipsalliance/t1-${{ matrix.config }}:latest