nixos-config/.github/workflows/build-devcontainers.yml
dependabot[bot] a13217867f
Some checks failed
Cache outputs / build-custom-packages (push) Has been cancelled
Check flake outputs / check-outputs (push) Has been cancelled
Publish every Git push to master to FlakeHub / flakehub-publish (push) Has been cancelled
Build devcontainers / build-devcontainers (push) Has been cancelled
Build personalized bootstrap ISO / build-iso (x86_64-linux) (push) Has been cancelled
Build project site / build (push) Has been cancelled
Build project site / deploy (push) Has been cancelled
Update Firefox addons / update-firefox-addons (push) Has been cancelled
ci: bump DeterminateSystems/magic-nix-cache-action from 8 to 9 (#33)
Bumps [DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action) from 8 to 9.
- [Release notes](https://github.com/determinatesystems/magic-nix-cache-action/releases)
- [Commits](https://github.com/determinatesystems/magic-nix-cache-action/compare/v8...v9)

---
updated-dependencies:
- dependency-name: DeterminateSystems/magic-nix-cache-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-15 12:04:54 +00:00

31 lines
1.0 KiB
YAML

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@v16
- uses: DeterminateSystems/magic-nix-cache-action@v9
with:
extra-conf: |
keep-going = true
- name: Build
run: |
nix build -f ./devcontainers --impure --print-out-paths --no-link > build_paths
env:
NIXPKGS_ALLOW_UNFREE: "1"
- name: Deploy devcontainers to GitHub registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u ${{ github.actor }} --password-stdin
for image_archive in $(< build_paths); do
CONTAINER_TAG=$(echo $image_archive | awk 'match($0, /docker-image-(\S+).tar.gz/, arr) {print arr[1]}')
skopeo copy \
"docker-archive:${image_archive}" "docker://ghcr.io/${{ github.repository }}:${CONTAINER_TAG}"
done