-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.22 KB
/
build.yml
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
34
35
36
37
38
39
40
41
42
name: Build
on:
pull_request:
push:
schedule:
- cron: "0 * * * *"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Update
id: update
run: ./meta/update.rb
if: github.event_name == 'schedule'
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Build container
run: docker build -t new . || docker build -t new .
if: github.event_name != 'schedule' || steps.update.outputs.updated == 'yes'
- name: Test container
run: ./scripts/test.sh
if: github.event_name != 'schedule' || steps.update.outputs.updated == 'yes'
- name: Publish images
run: ./meta/publish.sh || ./meta/publish.sh
if: github.event_name == 'push' || steps.update.outputs.updated == 'yes'
- name: Post to hook-exporter
run: ./.github/exporter.sh
env:
EXPORTER_TOKEN: ${{ secrets.EXPORTER_TOKEN }}
JOB_STATUS: ${{ job.status }}
if: ${{ always() }}