-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.33 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
43
44
45
46
47
48
49
50
name: Build and publish container
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "20 16 */7 * *"
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: toolbox-fedora
FEDORA_VERSION: 41
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4
- uses: redhat-actions/buildah-build@v2
id: build-image
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ env.FEDORA_VERSION }} ${{ github.sha }}
containerfiles: |
./Containerfile
build-args: |
FEDORA_VERSION=${{ env.FEDORA_VERSION }}
- uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}