sneeuwvlok/.forgejo/workflows/runner-image.yml
Chris Kruining d917f93a9f
Some checks failed
Test action / Print hello world (push) Failing after 12s
finally some more success?????
2025-09-04 13:55:13 +02:00

52 lines
No EOL
1.4 KiB
YAML

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: Pull dependencies
run: |
git clone https://${{ env.registry }}/${{ env.owner }}/sneeuwvlok.git .
- name: Prepare podman
run: |
# configure container policy to accept insecure registry
nix-env -iA nixpkgs.podman
# 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: Build image
run: nix-build modules/nixos/services/development/forgejo/runners/default.nix
# run: >-
# podman build
# -t ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
# -f Dockerfile.default
# modules/nixos/services/development/forgejo
- name: __DEBUG__
run: |
ls -al result
- name: Push image
run: |
podman load < result
podman push localhost/default:latest ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}