From 24c35a4a1671e5a177e903b7badecd5dc09037c8 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 17:43:39 -0600 Subject: [PATCH 01/12] change cache location to owners ghcr, load upstream images locally --- .github/workflows/build_test.yml | 16 +++++++--------- .github/workflows/publish_latest.yml | 12 ++++++------ .github/workflows/publish_release.yml | 8 ++++---- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index ad5083f6f..3a47c7fd0 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -61,10 +61,10 @@ jobs: uses: docker/build-push-action@v5 with: file: docker/Dockerfile - cache-from: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache - cache-to: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache - push: true + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max + tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-tag + load: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} @@ -85,14 +85,12 @@ jobs: with: context: ${{ github.workspace }}/cymetric file: ${{ github.workspace }}/cymetric/docker/Dockerfile - cache-from: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache - cache-to: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache,mode=max - tags: ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-image-cache - push: true + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache,mode=max build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} - cycamore_tag=ci-image-cache@${{ steps.build-cycamore.outputs.digest }} + cycamore_tag=ci-tag@${{ steps.build-cycamore.outputs.digest }} - name: PR Comment if: ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/publish_latest.yml b/.github/workflows/publish_latest.yml index 44c3e6d67..5512371fe 100644 --- a/.github/workflows/publish_latest.yml +++ b/.github/workflows/publish_latest.yml @@ -56,11 +56,11 @@ jobs: id: build-cycamore uses: docker/build-push-action@v5 with: - cache-from: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache - cache-to: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max file: docker/Dockerfile push: true - tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.tag }} + tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.tag }} build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} @@ -78,9 +78,9 @@ jobs: with: context: ${{ github.workspace }}/cymetric file: ${{ github.workspace }}/cymetric/docker/Dockerfile - cache-from: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache - cache-to: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache,mode=max - tags: ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:${{ env.tag }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache,mode=max + tags: ghcr.io/${{ github.repository_owner }}/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:${{ env.tag }} push: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index e1ab28891..d2fd64c1b 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -52,13 +52,13 @@ jobs: - name: Build, Test, and Push Cycamore uses: docker/build-push-action@v5 with: - cache-from: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache - cache-to: type=registry,ref=ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max file: docker/Dockerfile push: true tags: | - ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.version_tag }} - ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.stable_tag }} + ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.version_tag }} + ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:${{ env.stable_tag }} build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} From 09d6beccaa2eb30909fad4447a099ad4886cf660 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 17:52:05 -0600 Subject: [PATCH 02/12] add pr_comment.yml --- .github/workflows/build_test.yml | 37 +++++++++++++++++++++----------- .github/workflows/pr_comment.yml | 32 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/pr_comment.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 3a47c7fd0..b1912e94d 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -92,16 +92,29 @@ jobs: ubuntu_version=${{ matrix.ubuntu_versions }} cycamore_tag=ci-tag@${{ steps.build-cycamore.outputs.digest }} - - name: PR Comment - if: ${{ github.event_name == 'pull_request' }} - uses: thollander/actions-comment-pull-request@v2 + - name: Export Environment Variables + if: github.event_name == 'pull_request' + run: | + echo "CYCAMORE_BUILD_STATUS=${{steps.build-cycamore.outcome == 'success' && '**Success** :white_check_mark:' || + steps.build-cycamore.outcome == 'failure' && '**Failure** :x:' || + '**Skipped due to upstream failure** :warning:'}}" >> "$GITHUB_ENV" + + echo "CYMETRIC_BUILD_STATUS=${{steps.build-cymetric.outcome == 'success' && '**Success** :white_check_mark:' || + steps.build-cymetric.outcome == 'failure' && '**Failure** :x:' || + '**Skipped due to upstream failure** :warning:'}}" >> "$GITHUB_ENV" + + echo "ARTIFACT_NAME=${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}_${{ matrix.cyclus_tag }}" >> "$GITHUB_ENV" + + - name: Construct Artifact + if: github.event_name == 'pull_request' + run: | + echo "Build \`FROM cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{ matrix.cyclus }}\` + - Cycamore: ${{ env.CYCAMORE_BUILD_STATUS }} + - Cymetric: ${{ env.CYMETRIC_BUILD_STATUS }}" > ${{ env.ARTIFACT_NAME }}.txt + + - name: Upload Artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 with: - comment_tag: ${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}_${{ matrix.cyclus_tag }} - message: | - ## Build statuses using cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}:${{ matrix.cyclus_tag }} - - Cycamore: ${{steps.build-cycamore.outcome == 'success' && '*Success* :white_check_mark:' || - steps.build-cycamore.outcome == 'failure' && '**Failure** :x:' || - '**Skipped due to upstream failure** :warning:'}} - - Cymetric: ${{steps.build-cymetric.outcome == 'success' && '*Success* :white_check_mark:' || - steps.build-cymetric.outcome == 'failure' && '**Failure** :x:' || - '**Skipped due to upstream failure** :warning:'}} + name: ${{ env.ARTIFACT_NAME }} + path: ${{ env.ARTIFACT_NAME }}.txt diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml new file mode 100644 index 000000000..a2632a915 --- /dev/null +++ b/.github/workflows/pr_comment.yml @@ -0,0 +1,32 @@ +name: Comment on PR + +on: + workflow_run: + workflows: ["Build/Test for PR and collaborator push"] + types: + - completed + +jobs: + pr-comment: + runs-on: ubuntu-latest + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} + merge-multiple: true + + - name: Merge artifacts and get PR number + run: | + echo "### Build Status Report" > artifacts_merged.md + cat ./*.txt >> artifacts_merged.md + echo "PR_NUMBER=$(cat pr_number)" >> "$GITHUB_ENV" + + - name: PR Comment + uses: thollander/actions-comment-pull-request@v2 + with: + pr_number: ${{ env.PR_NUMBER }} + comment_tag: build_status_report + filePath: artifacts_merged.md \ No newline at end of file From 8728c5ee048d4d1864613869e6fbafa53670c397 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 17:54:12 -0600 Subject: [PATCH 03/12] no longer need pull_requests: write --- .github/workflows/build_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index b1912e94d..36cf9bf37 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -22,7 +22,6 @@ jobs: permissions: contents: read packages: write - pull-requests: write strategy: fail-fast: false From 110f48383db9d17ac7e98e85a9fa6cfdeb4c7932 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 17:58:41 -0600 Subject: [PATCH 04/12] change tag name for clarity --- .github/workflows/build_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 36cf9bf37..90e7f4555 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -62,7 +62,7 @@ jobs: file: docker/Dockerfile cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-tag + tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:local-ci-image load: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} @@ -89,7 +89,7 @@ jobs: build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} - cycamore_tag=ci-tag@${{ steps.build-cycamore.outputs.digest }} + cycamore_tag=local-ci-image@${{ steps.build-cycamore.outputs.digest }} - name: Export Environment Variables if: github.event_name == 'pull_request' From 0d7ea1268aba02d17fd814a84b4fd299c30d663e Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 18:03:27 -0600 Subject: [PATCH 05/12] Update CHANGELOG --- CHANGELOG.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b991df2c6..8f64868cf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,8 +5,9 @@ cycamore Change Log .. current developments **Added:** -* GitHub workflow for publishing images on release (#573) -* GitHub workflows for building/testing on a PR and push to `main` (#549, #564, #573) +* Downstream testing in CI workflows (#573, #580, #582) +* GitHub workflow for publishing images on release (#573, #582) +* GitHub workflows for building/testing on a PR and push to `main` (#549, #564, #573, #582) * Add functionality for random behavior on the size (#550) and frequency (#565) of a sink * GitHub workflow to check that the CHANGELOG has been updated (#562) * Added inventory policies to Storage through the material buy policy (#574) From 2f09af4b0719143e901a6e591452c1cb6b263698 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 18:13:41 -0600 Subject: [PATCH 06/12] upload PR number --- .github/workflows/build_test.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 90e7f4555..d0a60733f 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -117,3 +117,17 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.ARTIFACT_NAME }}.txt + + upload-pr-number: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - name: Save PR number to file + run: | + echo "${{ github.event.number }}" > pr_number + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: pr_number + path: pr_number \ No newline at end of file From 20d215e89f8838e2d0dcc3aba8f88efb8b14be34 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 18:18:05 -0600 Subject: [PATCH 07/12] modify comment --- .github/workflows/build_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d0a60733f..4f2afb25a 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -107,7 +107,8 @@ jobs: - name: Construct Artifact if: github.event_name == 'pull_request' run: | - echo "Build \`FROM cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{ matrix.cyclus }}\` + echo " + ##### Build \`FROM cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{ matrix.cyclus }}\` - Cycamore: ${{ env.CYCAMORE_BUILD_STATUS }} - Cymetric: ${{ env.CYMETRIC_BUILD_STATUS }}" > ${{ env.ARTIFACT_NAME }}.txt From 5ee87b4b7a709276f6ce3978ea8c354b4bf4ceed Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 18:20:51 -0600 Subject: [PATCH 08/12] fix cyclus_tag --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 4f2afb25a..a177ba91e 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -108,7 +108,7 @@ jobs: if: github.event_name == 'pull_request' run: | echo " - ##### Build \`FROM cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{ matrix.cyclus }}\` + ##### Build \`FROM cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{ matrix.cyclus_tag }}\` - Cycamore: ${{ env.CYCAMORE_BUILD_STATUS }} - Cymetric: ${{ env.CYMETRIC_BUILD_STATUS }}" > ${{ env.ARTIFACT_NAME }}.txt From e3cc0fa4dc9e0c96ffc1f242829af34d68de4a12 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 18:51:22 -0600 Subject: [PATCH 09/12] try using build context to define image --- .github/workflows/build_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index a177ba91e..6fe09d172 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -62,7 +62,7 @@ jobs: file: docker/Dockerfile cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - tags: ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:local-ci-image + tags: cycamore load: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} @@ -89,7 +89,9 @@ jobs: build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} - cycamore_tag=local-ci-image@${{ steps.build-cycamore.outputs.digest }} + cycamore_tag=local-ci-tag + build-contexts: | + ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:local-ci-tag=docker-image://cycamore@${{ steps.build-cycamore.outputs.digest }} - name: Export Environment Variables if: github.event_name == 'pull_request' From 71b2a93145af167a742a2c3c19564cede9a3a769 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 19:05:44 -0600 Subject: [PATCH 10/12] try build context as repository owners registry --- .github/workflows/build_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 6fe09d172..8ba384af6 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -62,8 +62,8 @@ jobs: file: docker/Dockerfile cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - tags: cycamore - load: true + tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache + push: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} @@ -89,9 +89,9 @@ jobs: build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} - cycamore_tag=local-ci-tag + cycamore_tag=ci-image-cache build-contexts: | - ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:local-ci-tag=docker-image://cycamore@${{ steps.build-cycamore.outputs.digest }} + ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache=docker-image://ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache@${{ steps.build-cycamore.outputs.digest }} - name: Export Environment Variables if: github.event_name == 'pull_request' From 83c0b2c18bf6073d9602b80975a4c0904d8a6764 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Mon, 12 Feb 2024 20:18:14 -0600 Subject: [PATCH 11/12] try image output --- .github/workflows/build_test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 8ba384af6..59fb0e921 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -62,8 +62,9 @@ jobs: file: docker/Dockerfile cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache - push: true + # tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache + # push: true + outputs: type=image,name=cycamore:ci-image-cache build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} @@ -91,7 +92,7 @@ jobs: ubuntu_version=${{ matrix.ubuntu_versions }} cycamore_tag=ci-image-cache build-contexts: | - ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache=docker-image://ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache@${{ steps.build-cycamore.outputs.digest }} + ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache=docker-image://cycamore:ci-image-cache@${{ steps.build-cycamore.outputs.digest }} - name: Export Environment Variables if: github.event_name == 'pull_request' From ff6bb41219eb521512715e5c53237c480baa9d27 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Mon, 12 Feb 2024 20:45:53 -0600 Subject: [PATCH 12/12] Revert "try image output" This reverts commit 83c0b2c18bf6073d9602b80975a4c0904d8a6764. --- .github/workflows/build_test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 59fb0e921..8ba384af6 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -62,9 +62,8 @@ jobs: file: docker/Dockerfile cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-layer-cache,mode=max - # tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache - # push: true - outputs: type=image,name=cycamore:ci-image-cache + tags: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache + push: true build-args: | pkg_mgr=${{ matrix.pkg_mgr }} ubuntu_version=${{ matrix.ubuntu_versions }} @@ -92,7 +91,7 @@ jobs: ubuntu_version=${{ matrix.ubuntu_versions }} cycamore_tag=ci-image-cache build-contexts: | - ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache=docker-image://cycamore:ci-image-cache@${{ steps.build-cycamore.outputs.digest }} + ghcr.io/cyclus/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache=docker-image://ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cycamore:ci-image-cache@${{ steps.build-cycamore.outputs.digest }} - name: Export Environment Variables if: github.event_name == 'pull_request'