Skip to content

dispatch-build

dispatch-build #369

name: Build and push container image
on:
push:
branches: [ master ]
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: ['23']
os: ['el9']
repo: ['release']
steps:
- uses: opensciencegrid/[email protected]
with:
base_os: ${{ matrix.os }}
osg_series: ${{ matrix.osg_series }}
osg_repo: ${{ 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 }}