next iteration for forgejo runners

This commit is contained in:
Chris Kruining 2025-09-08 16:18:02 +02:00
parent 1d6f488ebd
commit 2a79a4eb63
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
5 changed files with 8 additions and 156 deletions

View file

@ -1,47 +0,0 @@
name: Test action
on:
workflow_dispatch:
push:
branches:
- main
env:
registry: git.amarth.cloud
owner: chris
image: default
tag: latest
jobs:
hello:
name: Print hello world
runs-on: default
steps:
- name: Checkout
run: |
git clone ${{ forge.server_url }}/${{ forge.repository }}.git .
- name: Prepare podman
run: |
# configure container policy to accept insecure registry
nix-env -iA nixpkgs.podman nixpkgs.kvmtool
# configure container policy to accept insecure registry
mkdir -p ~/.config/containers
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
- name: Log into registry
run: |
podman login --username "${{ forge.actor }}" --password "${{ forge.token }}" ${{ env.registry }}
- name: Create image
run: |
nix-build runners/default.nix
podman load < result
- name: Push image
run: >-
podman push
--creds="${{ forge.actor }}:${{ forge.token }}"
localhost/default:latest
${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}