Reverting apptainer to 1.2.5 #48
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
# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC | |
# SPDX-License-Identifier: Apache-2.0 | |
# This workflow can be triggered w/ a dispatch event, e.g.: | |
# curl -X POST -H "Authorization: token $(cat ../token_file)" \ | |
# -H "Content-Type: application/json" -H "Accept: application/vnd.github.v3+json" \ | |
# https://api.github.com/repos/glideinwms/containers/dispatches \ | |
# -d '{"event_type":"worker-build", "client_payload": {"label":"latest", "date_tag":true}}' | |
# A valid GitHub token must be saved in the file (so that is presented in the authorization) | |
# otherwise a misleading "Not Found" message is returned. No reply is provided for successful posts. | |
# The client_payload label and date_tag are optional | |
# label is used as Docker Hub label instead of "latest" | |
# if date_tag id true a date tag is added to the Docker Hub label (+%Y%m%d-%H%M) | |
# -X POST is also optional | |
name: Build and Push Docker image for workers (release) | |
on: | |
push: | |
branches: [main ] | |
path: | |
- worker/fnal-wn-el9/Dockerfile | |
- worker/fnal-wn-el8/Dockerfile | |
- worker/fnal-wn-sl7/Dockerfile | |
- worker/fnal-wn-sl6/Dockerfile | |
repository_dispatch: | |
types: | |
- worker-build | |
env: | |
DH_LABEL: latest | |
OSG_VERSION: NO | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set label branch | |
id: setlabel_branch | |
shell: bash | |
run: | | |
if [[ ${GITHUB_REF##*/} = osg* ]]; then | |
echo "DH_LABEL=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "OSG_VERISON=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
fi | |
- name: set label from parameter | |
id: setlabel_parameter | |
continue-on-error: true | |
if: ${{ github.event.client_payload.label }} | |
run: | | |
echo "DH_LABEL=${{ github.event.client_payload.label }}" >> $GITHUB_ENV | |
- name: add date tag | |
continue-on-error: true | |
if: ${{ github.event.client_payload.date_tag }} | |
run: | | |
echo "DH_LABEL=$DH_LABEL-$(date +%Y%m%d-%H%M)" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push SL6 | |
id: docker_build_sl6 | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-wn-sl6/Dockerfile | |
tags: fermilab/fnal-wn-sl6:${{env.DH_LABEL}} | |
- name: Build and push SL7 | |
id: docker_build_el7 | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-wn-sl7/Dockerfile | |
tags: fermilab/fnal-wn-sl7:${{env.DH_LABEL}} | |
- name: Build and push SL7 dev | |
id: docker_build_el7_dev | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-dev-sl7/Dockerfile | |
tags: fermilab/fnal-dev-sl7:${{env.DH_LABEL}} | |
- name: Build and push EL8 | |
id: docker_build_el8 | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-wn-el8/Dockerfile | |
tags: fermilab/fnal-wn-el8:${{env.DH_LABEL}} | |
- name: Build and push EL9 | |
id: docker_build_el9 | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-wn-el9/Dockerfile | |
tags: fermilab/fnal-wn-el9:${{env.DH_LABEL}} | |
- name: Build and push SL6 OSG 3.5 | |
id: docker_build_sl6_osg35 | |
continue-on-error: true | |
if: ${{ env.OSG_VERISON }} == 'osg35' | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
context: worker | |
file: worker/fnal-wn-sl6/Dockerfile | |
tags: glideinwms/fnal-wn-sl6:${{env.DH_LABEL}} |