Skip to content

Merge pull request #7 from opensciencegrid/mwestphall-patch-1 #275

Merge pull request #7 from opensciencegrid/mwestphall-patch-1

Merge pull request #7 from opensciencegrid/mwestphall-patch-1 #275

name: Build and push container image
on:
push:
pull_request:
repository_dispatch:
types:
- dispatch-build
workflow_dispatch:
jobs:
make-date-tag:
runs-on: ubuntu-latest
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]
strategy:
fail-fast: false
matrix:
osg_series:
- series: '23'
image: 'opensciencegrid'
- series: '24'
image: 'osg-htc'
os: ['el9']
repo: ['development', 'testing', 'release']
steps:
- uses: opensciencegrid/[email protected]
with:
base_os: ${{ matrix.os }}
osg_series: ${{ matrix.osg_series.series }}
osg_repo: ${{ matrix.repo }}
output_image: ${{ matrix.osg_series.image }}/${{ github.event.repository.name }}:${{ matrix.osg_series.series }}-${{ matrix.repo }}
push_image: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && github.repository_owner == 'opensciencegrid'}}
registry_url: hub.opensciencegrid.org
registry_user: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
registry_pass: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}