-
Notifications
You must be signed in to change notification settings - Fork 48
59 lines (52 loc) · 1.56 KB
/
container-build-quay-io.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
59
---
name: Build DNF5 containers on quay.io
on:
schedule:
- cron: '0 4 * * *' # at 4am UTC, 2 hours after nightlies are built
workflow_dispatch:
# from https://github.com/marketplace/actions/push-to-registry
jobs:
build:
name: Build and push image
strategy:
fail-fast: false
matrix:
name:
- dnf5
- dnf5-nightly
- dnf5-testing
- dnf5-testing-nightly
tag:
- 38
- 39
- 40
- 41
- latest
- rawhide
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: fedora-${{ matrix.name }}
tags: ${{ matrix.tag }}
containerfiles: |
containerfiles/Containerfile
build-args: |
TAG=${{ matrix.tag }}
NAME=${{ matrix.name }}
# Podman Login action (https://github.com/redhat-actions/podman-login) also be used to log in,
# in which case 'username' and 'password' can be omitted.
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/rpmsoftwaremanagement
username: ${{ secrets.QUAY_IO_REGISTRY_USERNAME }}
password: ${{ secrets.QUAY_IO_REGISTRY_PASSWORD }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"