From 859034baf2f33b9ff2182d717adda7878c211a68 Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Tue, 22 Oct 2024 14:13:15 -0500 Subject: [PATCH] restore removed conditional runs --- .github/workflows/build-container.yml | 78 +++++++++++++-------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 775fbfe..e11ee31 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -17,16 +17,14 @@ jobs: strategy: fail-fast: false matrix: - # os: ['el9', 'cuda_11_8_0'] + os: ['el9', 'cuda_11_8_0'] # osg_series: ['23'] - # repo: ['development', 'testing', 'release'] - os: ['el9'] + repo: ['development', 'testing', 'release'] osg_series: - series: '24' image: 'osg-htc/ospool-ep' - series: '23' image: 'opensciencegrid/osgvo-docker-pilot' - repo: ['development'] platform: ['linux/amd64','linux/arm64'] exclude: # cuda builds take a super long time; only do one of them @@ -106,10 +104,10 @@ jobs: fi - id: upload-by-digest-harbor - # if: >- - # github.ref == 'refs/heads/master' && - # github.event_name != 'pull_request' && - # github.repository_owner == 'opensciencegrid' + if: >- + github.ref == 'refs/heads/master' && + github.event_name != 'pull_request' && + contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner) name: Upload By Digest to Harbor uses: ./.github/actions/push-digest-local with: @@ -128,53 +126,53 @@ jobs: # and will remain as cruft in harbor unlesss manually removed in the case that # some arch fails. Handling this scenario is future work: # https://opensciencegrid.atlassian.net/browse/SOFTWARE-6010 - # - id: upload-by-digest-dockerhub - # # if: >- - # # github.ref == 'refs/heads/master' && - # # github.event_name != 'pull_request' && - # # github.repository_owner == 'opensciencegrid' - # name: Upload By Digest to Docker Hub - # uses: ./.github/actions/push-digest-local - # with: - # registry: docker.io - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_PASSWORD }} - # osg_series: ${{ matrix.osg_series }} - # osg_repo: ${{ matrix.repo }} - # base_os: ${{ matrix.os }} - # platform: ${{ matrix.platform }} - # base_tag: ${{ steps.custom-image-name.outputs.base_tag }} - # timestamp: ${{ steps.custom-image-name.outputs.timestamp }} - # output_image: ${{ steps.custom-image-name.outputs.output_image }} + - id: upload-by-digest-dockerhub + # TODO support the osg-htc organization on dockerhub + if: >- + github.ref == 'refs/heads/master' && + github.event_name != 'pull_request' && + contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner) && + startsWith(matrix.osg_series.image, 'opensciencegrid') + + name: Upload By Digest to Docker Hub + uses: ./.github/actions/push-digest-local + with: + registry: docker.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + osg_series: ${{ matrix.osg_series }} + osg_repo: ${{ matrix.repo }} + base_os: ${{ matrix.os }} + platform: ${{ matrix.platform }} + base_tag: ${{ steps.custom-image-name.outputs.base_tag }} + timestamp: ${{ steps.custom-image-name.outputs.timestamp }} + output_image: ${{ steps.custom-image-name.outputs.output_image }} merge-manifests: runs-on: ubuntu-latest - # if: >- - # github.ref == 'refs/heads/master' && - # github.event_name != 'pull_request' && - # github.repository_owner == 'opensciencegrid' + if: >- + github.ref == 'refs/heads/master' && + github.event_name != 'pull_request' && + contains(fromJson('["opensciencegrid","osg-htc"]'), github.repository_owner) needs: - build-images strategy: fail-fast: false matrix: - # os: ['el9', 'cuda_11_8_0'] - # osg_series: ['23'] - # repo: ['development', 'testing', 'release'] - os: ['el9'] + os: ['el9', 'cuda_11_8_0'] + repo: ['development', 'testing', 'release'] osg_series: ['23', '24'] - repo: ['development'] registry: [ { url: hub.opensciencegrid.org, username: OSG_HARBOR_ROBOT_USER, password: OSG_HARBOR_ROBOT_PASSWORD }, - # { - # url: docker.io, - # username: DOCKER_USERNAME, - # password: DOCKER_PASSWORD - # } + { + url: docker.io, + username: DOCKER_USERNAME, + password: DOCKER_PASSWORD + } ] exclude: # cuda builds take a super long time; only do one of them