-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (32 loc) · 1.01 KB
/
auto-update-runner.yaml
File metadata and controls
33 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Automatically rebuild the runner dockerfile if base image changes
name: Auto update images
on:
#schedule:
# # Random-ish time in the morning
# - cron: "42 3 * * *"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Check if we have to even do all this
id: check
uses: twiddler/is-my-docker-parent-image-out-of-date@v1
with:
parent-image: rust:alpine
my-image: ghcr.io/theconner/rustbot-runner:latest
- name: Needs update?
run: |
echo "Needs to update ${{ steps.check.outputs.out-of-date }}"
outputs:
needsupdate: ${{ steps.check.outputs.out-of-date }}
do-update:
needs: [check]
secrets: inherit
uses: ./.github/workflows/build-release-container.yaml
with:
image_name: rustbot-runner
image_file: runner.Dockerfile
if: needs.check.outputs.needsupdate == 'true'