Merge pull request #3786 from brianhlin/add-executive-contact #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Client EL8 Docker image | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- 'Dockerfile.client' | |
- 'bin/osg-notify' | |
- 'src/net_name_addr_utils.py' | |
- 'src/topology_utils.py' | |
workflow_dispatch: | |
jobs: | |
make-date-tag: | |
runs-on: ubuntu-latest | |
if: startsWith(github.repository, 'opensciencegrid/') | |
outputs: | |
dtag: ${{ steps.mkdatetag.outputs.dtag }} | |
steps: | |
- name: make date tag | |
id: mkdatetag | |
run: echo "dtag=$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
needs: [make-date-tag] | |
if: startsWith(github.repository, 'opensciencegrid/') | |
strategy: | |
fail-fast: False | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate tag list | |
id: generate-tag-list | |
env: | |
TIMESTAMP: ${{ needs.make-date-tag.outputs.dtag }} | |
run: | | |
docker_repo=opensciencegrid/topology-notify | |
tag_list=() | |
for registry in hub.opensciencegrid.org docker.io; do | |
tag_list+=($registry/$docker_repo:release) | |
tag_list+=($registry/$docker_repo:release-$TIMESTAMP) | |
done | |
IFS=, | |
echo "taglist=${tag_list[*]}" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2.7.0 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2.2.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to OSG Harbor | |
uses: docker/login-action@v2.2.0 | |
with: | |
registry: hub.opensciencegrid.org | |
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }} | |
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }} | |
- name: Build and push Client Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: "${{ steps.generate-tag-list.outputs.taglist }}" | |
file: ./Dockerfile.client |