-
Notifications
You must be signed in to change notification settings - Fork 219
64 lines (56 loc) · 1.77 KB
/
arch-images.yaml
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
59
60
61
62
63
64
name: "Arch Linux: Build and push arch-toolbox image"
permissions: read-all
on:
pull_request:
branches:
- main
paths:
- images/arch/**
- .github/workflows/arch-images.yaml
push:
branches:
- main
paths:
- images/arch/**
- .github/workflows/arch-images.yaml
schedule:
- cron: '0 0 * * MON'
env:
distro: 'arch'
platforms: 'linux/amd64'
registry: 'quay.io/toolbx'
username: 'toolbx+github'
# Prevent multiple workflow runs from racing to ensure that pushes are made
# sequentially 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-images:
name: Build and push the arch-toolbox image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build container image (latest tag)
uses: redhat-actions/buildah-build@v2
if: env.latest_release == matrix.release
with:
platforms: ${{ env.platforms }}
context: images/${{ env.distro }}
image: ${{ env.distro }}-toolbox
tags: latest
containerfiles: images/${{ env.distro }}/Containerfile
layers: false
oci: true
- name: Push to Container Registry (latest tag)
uses: redhat-actions/push-to-registry@v2
id: push-latest
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
with:
username: ${{ env.username }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
image: ${{ env.distro }}-toolbox
registry: ${{ env.registry }}
tags: latest