mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
ci: build and push devcontainers to GitHub container registry
This commit is contained in:
parent
2d97eb9638
commit
27bfb04da9
28
.github/workflows/build-devcontainers.yml
vendored
Normal file
28
.github/workflows/build-devcontainers.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: "Build devcontainers"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
jobs:
|
||||||
|
build-devcontainers:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@v14
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||||
|
with:
|
||||||
|
extra-conf: |
|
||||||
|
keep-going = true
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
nix build -f ./pkgs --impure --print-out-paths --no-link > build_paths
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user