Skip to content

Commit 043b01d

Browse files
committed
feat: use flox in CI
1 parent 3ad5878 commit 043b01d

File tree

3 files changed

+144
-12
lines changed

3 files changed

+144
-12
lines changed

.flox/env/manifest.lock

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.flox/env/manifest.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ iptables.systems = ["aarch64-linux", "x86_64-linux"]
1010
podman.pkg-path = "podman"
1111
podman.systems = ["aarch64-linux", "x86_64-linux"]
1212
gh.pkg-path = "gh"
13+
buildah.pkg-path = "buildah"

.github/workflows/build.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,39 @@ env:
1414
# Defaults to ghcr.io/<owner>/<repo>
1515
IMAGE_BASE: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
1616
BUILDAH_FORMAT: docker # broad runtime compatibility
17+
FLOX_DISABLE_METRICS: "true"
1718

1819
jobs:
1920
build:
20-
runs-on: ubuntu-latest
21+
runs-on: "ubuntu-22.04"
2122

2223
steps:
2324
- name: Checkout
2425
uses: actions/checkout@v4
2526

26-
- name: Install Podman
27-
run: |
28-
sudo apt update
29-
sudo apt -y install podman
27+
- name: "Install Flox"
28+
uses: "flox/install-flox-action@main"
3029

3130
- name: Build image
32-
run: |
31+
uses: "flox/activate-action@main"
32+
with:
3333
# temp local tag; we'll retag as :latest only on push events
34-
podman build -t "${IMAGE_BASE}:ci-build" .
34+
command: |
35+
buildah bud -t "${IMAGE_BASE}:ci-build" .
3536
3637
- name: Log in to GHCR
3738
if: ${{ github.event_name == 'push' }}
39+
uses: "flox/activate-action@main"
3840
env:
3941
CR_PAT: ${{ secrets.GITHUB_TOKEN }}
40-
run: |
41-
echo "${CR_PAT}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
42+
with:
43+
command: |
44+
sh -c 'echo "${CR_PAT}" | buildah login ghcr.io -u ${{ github.actor }} --password-stdin'
4245
4346
- name: Tag & push :latest (main only)
4447
if: ${{ github.event_name == 'push' }}
45-
run: |
46-
podman tag "${IMAGE_BASE}:ci-build" "${IMAGE_BASE}:latest"
47-
podman push "${IMAGE_BASE}:latest"
48+
uses: "flox/activate-action@main"
49+
with:
50+
command: |
51+
sh -c 'buildah tag "${IMAGE_BASE}:ci-build" "${IMAGE_BASE}:latest" && buildah push "${IMAGE_BASE}:latest"'
4852

0 commit comments

Comments
 (0)