-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (51 loc) · 1.49 KB
/
unbound.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Build unbound image"
env:
NAME: "unbound"
TAGS: "latest ${{ github.sha }}"
REGISTRY: "quay.io/travier"
on:
pull_request:
branches:
- main
paths:
- unbound/*
- .github/workflows/unbound.yml
push:
branches:
- main
paths:
- unbound/*
- .github/workflows/unbound.yml
schedule:
- cron: '0 0 * * MON'
permissions: read-all
# Prevent multiple workflow runs from racing to ensure that pushes are made
# sequentialy for the main branch. Also cancel in progress workflow runs for
# pull requests only.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build container image
uses: redhat-actions/buildah-build@v2
with:
context: ${{ env.NAME }}
image: ${{ env.NAME }}
tags: ${{ env.TAGS }}
containerfiles: ${{ env.NAME }}/Containerfile
layers: false
oci: true
- name: Push to Quay.io
uses: redhat-actions/push-to-registry@v2
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
with:
username: ${{ secrets.BOT_USERNAME }}
password: ${{ secrets.BOT_SECRET }}
image: ${{ env.NAME }}
registry: ${{ env.REGISTRY }}
tags: ${{ env.TAGS }}