Skip to content

Commit

Permalink
Also attempt to push to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphall committed Oct 3, 2024
1 parent 25a8ee2 commit a5c452e
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
# "$CONTAINER_IMAGE"
# fi

- id: upload-by-digest
- id: upload-by-digest-harbor
uses: ./.github/actions/push-digest-local
with:
registry: hub.opensciencegrid.org
Expand All @@ -107,6 +107,20 @@ jobs:
timestamp_image: ${{ steps.build-image.outputs.timestamp-image }}
output_image: ${{ steps.custom-image-name.outputs.output_image }}

- id: upload-by-digest-dockerhub
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_image: ${{ steps.build-image.outputs.timestamp-image }}
output_image: ${{ steps.custom-image-name.outputs.output_image }}

# - name: Harbor login
# # if: >-
# # github.ref == 'refs/heads/master' &&
Expand Down Expand Up @@ -189,6 +203,13 @@ jobs:
repo: development
- os: cuda_11_8_0
repo: testing
include:
- registry: hub.opensciencegrid.org
username: OSG_HARBOR_ROBOT_USER
password: OSG_HARBOR_ROBOT_PASSWORD
- registry: docker.io
username:
password: OSG_HARBOR_ROBOT_PASSWORD
steps:
- id: base-tag
env:
Expand Down Expand Up @@ -228,16 +249,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Harbor login
- name: Registry login
# if: >-
# github.ref == 'refs/heads/master' &&
# github.event_name != 'pull_request' &&
# github.repository_owner == 'opensciencegrid'
uses: docker/login-action@v2
with:
registry: ${{ matrix.registry }}
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}
username: ${{ secrets[matrix.username] }}
password: ${{ secrets[matrix.password] }}

- name: Merge Artifacts
working-directory: /tmp/${{ matrix.registry }}
Expand Down

0 comments on commit a5c452e

Please sign in to comment.