From b7407bb1a7020d582d361b9fe9c796f489e68d96 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 6 Nov 2023 17:18:31 -0500 Subject: [PATCH 1/2] ci/github: Set SOURCE_DATE_EPOCH This is important since it turns on some rpm-ostree reproducibility bits. TODO: replicate with RHTAP --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/publish-image.yml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97b41015..85b0ff93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,12 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Workaround git safe.directory + run: git config --global --add safe.directory '*' + + - name: Set SOURCE_DATE_EPOCH + run: echo SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) >> $GITHUB_ENV + - name: Build run: | rpm-ostree compose image --format=ociarchive \ diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 08efa7c8..08a09979 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -34,6 +34,13 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # The --privileged bits seem to trip this up + - name: Ensure git safe directory + run: git config --global --add safe.directory '*' + + - name: Set SOURCE_DATE_EPOCH + run: echo SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) >> $GITHUB_ENV + - name: Build and Push run: | echo "${{ secrets.QUAY_PASSWORD }}" | skopeo login -u "${{ secrets.QUAY_USER }}" \ From 23140d624b5d1fad7a355b05a1e39f51898235e6 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 9 Nov 2023 17:30:47 -0500 Subject: [PATCH 2/2] ci: Re-float to builder image Until something is tagging the builder image, quay.io is going to GC older images. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85b0ff93..ea5d2c25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest container: - image: quay.io/centos-boot/builder:latest@sha256:1d4eb0aff4fc11274b19fade0c380de6c3e4a3ec3786a824c3ed49cb5e397b84 + image: quay.io/centos-boot/builder:latest options: --privileged strategy: