Skip to content

Commit

Permalink
fixup! migrate docker-images
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj committed Jan 28, 2025
1 parent 4870058 commit 235c7d8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 59 deletions.
39 changes: 39 additions & 0 deletions .github/actions/buildah/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Install build tools
description: 'Install build tools'
runs:
using: composite
steps:
- name: buildah
shell: sh
run: |
sudo apt-get -y -qq update
sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev libglib2.0-dev libgpgme11-dev libseccomp-dev libselinux1-dev make skopeo
git clone https://github.com/containers/buildah buildah
git -C buildah checkout v1.38.0
make -C buildah buildah
sudo mkdir -p /usr/local/bin/
sudo cp "$PWD/buildah/bin"/* /usr/local/bin/
- name: netavark
shell: sh
run: |
curl -L https://github.com/containers/netavark/releases/download/v1.13.1/netavark.gz --output netavark.gz
gzip -d netavark.gz
chmod +x netavark
sudo mkdir -p /usr/local/libexec/podman/
mv netavark /usr/local/libexec/podman/
- name: crun
shell: sh
run: |
curl -L https://github.com/containers/crun/releases/download/1.19.1/crun-1.19.1-linux-amd64 --output crun
chmod +x crun
sudo cp crun /usr/local/bin/crun
echo "BUILDAH_RUNTIME=/usr/local/bin/crun" >> $GITHUB_ENV
- name: passt
shell: sh
run: |
git clone https://passt.top/passt
make -C passt
sudo make -C passt install
65 changes: 6 additions & 59 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
env:
IMAGE_LABEL_OWNER: ${{ github.repository_owner }}
IMAGE_LABEL_REPO: ${{ github.repository }}
SLUG: ${{ github.repository_owner }}/act
DISTRO: ubuntu
NODE: '16 18 20 22'
BUILD_REF: ${{ github.sha }}
Expand All @@ -40,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
env:
PLATFORMS: ${{ matrix.PLATFORMS }}
SLUG: ${{ env.SLUG }}-minimal
SLUG: ${{ github.repository_owner }}/act-minimal
strategy:
fail-fast: true
max-parallel: 4
Expand All @@ -59,34 +58,10 @@ jobs:
with:
go-version: '>=1.21.0'

- uses: actions/checkout@v3

- name: Setup buildah
run: |
# buildah
sudo apt-get -y -qq update
sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev libglib2.0-dev libgpgme11-dev libseccomp-dev libselinux1-dev make skopeo
git clone https://github.com/containers/buildah buildah
git -C buildah checkout v1.38.0
make -C buildah buildah
sudo mkdir -p /usr/local/bin/
sudo cp "$PWD/buildah/bin"/* /usr/local/bin/
# netavark
curl -L https://github.com/containers/netavark/releases/download/v1.13.1/netavark.gz --output netavark.gz
gzip -d netavark.gz
chmod +x netavark
sudo mkdir -p /usr/local/libexec/podman/
mv netavark /usr/local/libexec/podman/
# crun
curl -L https://github.com/containers/crun/releases/download/1.19.1/crun-1.19.1-linux-amd64 --output crun
chmod +x crun
sudo cp crun /usr/local/bin/crun
echo "BUILDAH_RUNTIME=/usr/local/bin/crun" >> $GITHUB_ENV
# passt
git clone https://passt.top/passt
make -C passt
sudo make -C passt install
uses: ./.github/actions/buildah

- name: Force SLUG to lowercase
uses: actions/github-script@v6
Expand Down Expand Up @@ -122,8 +97,6 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- uses: actions/checkout@v3

- name: Build and push ${{ env.DISTRO }}:${{ env.TAG }}
shell: buildah unshare pwsh "{0}"
env:
Expand Down Expand Up @@ -233,7 +206,7 @@ jobs:
PLATFORMS: ${{ matrix.PLATFORMS }}
BUILD_TAG: ${{ matrix.TYPE }}-${{ matrix.TAG }}
TYPE: ${{ matrix.TYPE }}
SLUG: ${{ env.SLUG }}-${{ matrix.TYPE }}
SLUG: ${{ github.repository_owner }}/act-${{ matrix.TYPE }}
strategy:
fail-fast: false
max-parallel: 8
Expand Down Expand Up @@ -277,33 +250,7 @@ jobs:
go-version: '>=1.21.0'

- name: Setup buildah
run: |
# buildah
sudo apt-get -y -qq update
sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev libglib2.0-dev libgpgme11-dev libseccomp-dev libselinux1-dev make skopeo
git clone https://github.com/containers/buildah buildah
git -C buildah checkout v1.38.0
make -C buildah buildah
sudo mkdir -p /usr/local/bin/
sudo cp "$PWD/buildah/bin"/* /usr/local/bin/
# netavark
curl -L https://github.com/containers/netavark/releases/download/v1.13.1/netavark.gz --output netavark.gz
gzip -d netavark.gz
chmod +x netavark
sudo mkdir -p /usr/local/libexec/podman/
mv netavark /usr/local/libexec/podman/
# crun
curl -L https://github.com/containers/crun/releases/download/1.19.1/crun-1.19.1-linux-amd64 --output crun
chmod +x crun
sudo cp crun /usr/local/bin/crun
echo "BUILDAH_RUNTIME=/usr/local/bin/crun" >> $GITHUB_ENV
# passt
git clone https://passt.top/passt
make -C passt
sudo make -C passt install
uses: ./.github/actions/buildah

- name: Cleanup
run: |
Expand Down

0 comments on commit 235c7d8

Please sign in to comment.