name: "Build Runner Base"

on:
  schedule:
    - cron: "0 0 * * *"
  push:
    branches:
      - "master"

jobs:
  build_act:
    runs-on: "docker"
    steps:
      - name: Install Node
        run: apk add nodejs
      - name: Login to Registry
        uses: "https://git.euph.dev/actions/docker-login@v3"
        with:
          registry: git.euph.dev
          username: ${{ secrets.DEPLOY_USER }}
          password: ${{ secrets.DEPLOY_SECRET }}
      - name: Build and push act base image
        id: build_act_base
        uses: "https://git.euph.dev/actions/docker-build-push@v5"
        with:
          context: "{{defaultContext}}:images/actions/act"
          push: true
          tags: |
            git.euph.dev/actions/runner-basic:latest
            git.euph.dev/actions/runner-basic:${{ github.run_number }}