runners/.forgejo/workflows/build.yml
Chris Kruining ede6f306c4
Some checks failed
Create OCI image(s) / Build and push images (push) Failing after 10s
clean up pipeline
2025-09-08 15:26:07 +02:00

41 lines
1 KiB
YAML

name: Create OCI image(s)
on:
workflow_dispatch:
push:
branches:
- main
env:
registry: git.amarth.cloud
owner: amarth
image: default
tag: latest
jobs:
build:
name: Build and push images
runs-on: default
steps:
- name: Install dependencies
run: |
nix-env -iA nixpkgs.nodejs nixpkgs.podman nixpkgs.kvmtool
# configure container policy to accept insecure registry
mkdir -p ~/.config/containers
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
- uses: actions/checkout@v4
- name: Log into registry
run: |
podman login --username "${{ forge.actor }}" --password "${{ secrets.PACKAGE_TOKEN }}" ${{ env.registry }}
- name: Create image
run: |
nix-build src/${{ env.image }}.nix
podman load < result
- name: Push image
run: |
podman push localhost/${{ env.image }}:${{ env.tag }} ${{ env.registry }}/${{ forge.repo }}/${{ env.image }}:${{ env.tag }}