add CI images to repo
This commit is contained in:
parent
abce966b76
commit
aa9e5a90c6
8 changed files with 103 additions and 6 deletions
19
.forgejo/workflows/images.yaml
Normal file
19
.forgejo/workflows/images.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
check:
|
||||
runs-on: nix-upstream-latest
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "read"
|
||||
steps:
|
||||
- run: echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
- run: nix-env -i nodejs skopeo # bootstrap
|
||||
- uses: actions/checkout@v4
|
||||
- run: mkdir -p /etc/containers && cp .forgejo/default-policy.json /etc/containers/policy.json
|
||||
- run: |-
|
||||
for line in $(cat .forgejo/tags.txt); do
|
||||
IFS=: read -r pkg tag <<< $line
|
||||
cp $(nix build .#$pkg --print-out-paths) /tmp/img.tar.gz
|
||||
gunzip /tmp/img.tar.gz
|
||||
skopeo copy --dest-creds="${{ secrets.FJ_USER }}:${{ secrets.FJ_PASS }}" docker-archive:///tmp/img.tar docker://git.10110110.xyz/ci/$tag:latest
|
||||
done
|
||||
|
|
@ -7,13 +7,17 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: nix-latest
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "read"
|
||||
strategy:
|
||||
matrix:
|
||||
package_name: ["nvim"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- name: check
|
||||
- uses: DeterminateSystems/flakehub-cache-action@main
|
||||
- name: nix flake check
|
||||
run: nix flake check
|
||||
- name: Run `nix bundle`
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue