Skip to content

gitops-analysis-base-trigger #52

gitops-analysis-base-trigger

gitops-analysis-base-trigger #52

Workflow file for this run

# trigger uses "github.event.client_payload.ref" tag of the base image
name: Build on trigger
on:
repository_dispatch:
types: gitops-analysis-base-trigger
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
sslhep/analysis-dask-uc
hub.opensciencegrid.org/usatlas/analysis-dask-uc
tags: |
type=sha,
type=raw,value=${{ github.event.client_payload.ref }}
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Harbor Container Registry
uses: docker/[email protected]
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Test build
uses: docker/[email protected]
with:
context: .
file: Dockerfile
build-args: |
BASE_TAG=${{ github.event.client_payload.ref }}
load: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: Dockerfile
build-args: |
BASE_TAG=${{ github.event.client_payload.ref }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# we could use the code commented bellow to update AF frontend to add/change images selectable.
# - name: Repository Dispatch
# uses: peter-evans/[email protected]
# with:
# token: ${{ secrets.GITOPS_REBUILD_TRIGGER }}
# repository: analysis-dask/usatlas
# event-type: gitops-analysis-base-trigger
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
# - name: Update Version In Checked-Out Code
# if: ${{ github.event.client_payload.sha }}
# run: |
# sed -i "s@\(.*image:\).*@\1 docker.io/sandci/alarms_and_alerts:${{ github.event.client_payload.sha }}@" ${GITHUB_WORKSPACE}/atlas-analytics/crons/perfsonar/*.yaml
# - name: Commit The New Image Reference
# uses: stefanzweifel/[email protected]
# if: ${{ github.event.client_payload.sha }}
# with:
# commit_message: Deploy new AAAS PerfSONAR image ${{ github.event.client_payload.sha }}
# branch: main
# commit_options: "--no-verify --signoff"
# repository: .
# commit_user_name: AAAS GitOps Bot
# commit_user_email: [email protected]
# commit_author: AAAS GitOps Bot <[email protected]>