2024-10-28 01:57:15 +00:00
|
|
|
name: "Build devcontainers"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
jobs:
|
|
|
|
build-devcontainers:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2025-01-05 08:52:26 +00:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@v16
|
2024-10-28 01:57:15 +00:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
|
|
|
with:
|
|
|
|
extra-conf: |
|
|
|
|
keep-going = true
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2024-10-30 11:33:14 +00:00
|
|
|
nix build -f ./devcontainers --impure --print-out-paths --no-link > build_paths
|
2024-10-28 01:57:15 +00:00
|
|
|
env:
|
|
|
|
NIXPKGS_ALLOW_UNFREE: "1"
|
|
|
|
- name: Deploy devcontainers to GitHub registry
|
|
|
|
run: |
|
|
|
|
for image_archive in $(< build_paths); do
|
|
|
|
skopeo --insecure-policy copy \
|
|
|
|
--dest-creds="${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}" \
|
|
|
|
"docker-archive:${image_archive}" "docker://${{ github.repository }}"
|
|
|
|
done
|