Skip to content

fix: Restore lock file builds on main and create stable environemt #97

fix: Restore lock file builds on main and create stable environemt

fix: Restore lock file builds on main and create stable environemt #97

Workflow file for this run

name: Build AnalysisBase base images
on:
push:
branches: ["main"]
tags:
- "v*.*.*"
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
sslhep/analysis-dask-base
hub.opensciencegrid.org/usatlas/analysis-dask-base
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Harbor Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Test build
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
load: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: List built images
if: github.event_name == 'pull_request'
run: docker images
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Repository Dispatch
if: github.event_name != 'pull_request'
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITOPS_REBUILD_TRIGGER }}
repository: usatlas/analysisbase-dask-uc
event-type: gitops-analysis-base-trigger
client-payload: '{"ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}"}'