-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 2.08 KB
/
container.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
60
name: build ci container
on:
push:
branches:
- 'master'
- 'container'
paths:
- '.github/workflows/container.yml'
- 'test/Dockerfile'
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install QEMU
run: |
sudo apt-get update
DEBIAN_FRONTEND='noninteractive' sudo apt-get install -qy qemu-user-static
# remove this when Ubuntu 24.04 is available on GitHub Actions
- name: Enable Ubuntu noble and update buildah
run: |
echo 'deb http://archive.ubuntu.com/ubuntu/ noble main restricted universe' | sudo tee -a /etc/apt/sources.list.d/lunar.list
echo 'deb http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe' | sudo tee -a /etc/apt/sources.list.d/lunar.list
sudo apt-get update
DEBIAN_FRONTEND='noninteractive' sudo apt-get install -qy buildah
buildah version
- uses: actions/checkout@v4
- name: Build Images
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: rauc-ci
tags: latest
platforms: linux/amd64, linux/386, linux/arm/v5, linux/arm/v7, linux/arm64/v8
containerfiles: |
./test/Dockerfile
- name: Echo Outputs for Build
run: |
echo "Image: ${{ steps.build-image.outputs.image }}"
echo "Tags: ${{ steps.build-image.outputs.tags }}"
echo "Tagged Image: ${{ steps.build-image.outputs.image-with-tag }}"
- name: List Images
run: |
buildah images
- name: Inspect Manifest
run: |
buildah manifest inspect "${{ steps.build-image.outputs.image-with-tag }}"
- name: Push Images
id: push-to-github
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/${{ github.repository }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Echo Output for Push
run: echo "Image pushed to ${{ steps.push-to-github.outputs.registry-paths }}"