renaming pipelines #3
Workflow file for this run
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 on push | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "v*.*.*" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Docker meta | |
id: meta | |
uses: docker/[email protected] | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
sslhep/analysis-dask-uc | |
hub.opensciencegrid.org/usatlas/analysis-dask-uc | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=sha | |
- 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 | |
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 | |
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]> |