forked from containers/toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.46 KB
/
image-factory.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
name: Image Factory
on:
schedule:
- cron: "0 0 * * *"
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-push-images:
name: Build & Push Toolbx images
runs-on: ubuntu-latest
strategy:
matrix:
pool:
- image: fedora-toolbox-36
version: 36
dir: fedora/f36
- image: fedora-toolbox-35
version: 35
dir: fedora/f35
- image: fedora-toolbox-34
version: 34
dir: fedora/f34
steps:
- uses: actions/checkout@v2
- name: Login to Registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: ./Containerfile
context: ./images/${{ matrix.pool.dir }}
image: ${{ matrix.pool.image }}
oci: true
tags: ${{ matrix.pool.version }}
# TODO: Testing of newly-created images
- name: Push Image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}