runner-images/.forgejo/workflows/base.yml

55 lines
1.6 KiB
YAML
Raw Normal View History

2024-05-09 20:13:57 +00:00
name: "Build Runner Base"
2024-05-09 19:56:02 +00:00
on:
schedule:
2025-01-29 18:51:51 +01:00
- cron: "0 0 * * *"
2024-05-09 19:56:02 +00:00
push:
branches:
2025-01-29 18:51:51 +01:00
- "master"
2024-05-09 19:56:02 +00:00
jobs:
build_act:
2025-01-29 18:51:51 +01:00
runs-on: "docker"
2025-01-29 19:51:23 +01:00
env:
2025-01-29 20:18:38 +01:00
DOCKER_HOST: tcp://docker:2376
2024-05-09 19:56:02 +00:00
steps:
2025-01-29 20:18:38 +01:00
- name: install docker
2025-01-29 20:19:11 +01:00
run: sudo apk add docker
2025-01-29 19:59:25 +01:00
- name: Wait for Docker daemon
run: |
timeout=300 # Set a timeout value in seconds
until docker info; do
echo "Waiting for Docker daemon to start..."
sleep 5
timeout=$((timeout-5))
if [ $timeout -le 0 ]; then
echo "Timeout waiting for Docker daemon to start."
exit 1
fi
done
2025-01-29 19:51:23 +01:00
- name: A
run: |
apk add net-tools
netstat -tuln
2025-01-29 19:38:21 +01:00
- name: Install Node
run: apk add nodejs
2025-01-29 18:39:37 +01:00
- name: Set up QEMU
2025-01-29 18:51:51 +01:00
uses: "https://git.euph.dev/actions/docker-setup-qemu@v3"
2025-01-29 18:28:51 +01:00
- name: Setup Buildx
2025-01-29 18:51:51 +01:00
uses: "https://git.euph.dev/actions/docker-setup-buildx@v3"
2024-05-09 19:56:02 +00:00
- name: Login to Registry
2025-01-29 18:51:51 +01:00
uses: "https://git.euph.dev/actions/docker-login@v3"
2024-05-09 19:56:02 +00:00
with:
registry: git.euph.dev
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SECRET }}
- name: Build and push act base image
id: build_act_base
2025-01-29 18:51:51 +01:00
uses: "https://git.euph.dev/actions/docker-build-push@v5"
2024-05-09 19:56:02 +00:00
with:
context: "{{defaultContext}}:images/actions/act"
push: true
tags: |
git.euph.dev/actions/runner-basic:latest
2025-01-29 14:12:42 +01:00
git.euph.dev/actions/runner-basic:${{ forgejo.run_number }}