Skip to content

Commit

Permalink
Add support for tags in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivukotic committed Nov 9, 2023
1 parent 6d80780 commit 80dd619
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/base_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build AnalysisBase base image
on:
push:
branches:
- "main"
- "**"
tags:
- "v*.*.*"

jobs:
docker:
Expand All @@ -11,6 +13,21 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- 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/[email protected]

Expand All @@ -36,11 +53,8 @@ jobs:
context: .
file: docker/Dockerfile
push: true
tags: |
sslhep/analysis-dask-base:latest
sslhep/analysis-dask-base:${{ github.sha }}
hub.opensciencegrid.org/usatlas/analysis-dask-base:latest
hub.opensciencegrid.org/usatlas/analysis-dask-base:${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Repository Dispatch
uses: peter-evans/[email protected]
Expand Down

0 comments on commit 80dd619

Please sign in to comment.