move base layer to alma9 (#284) #9
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: Docker automatic build and publish with repository releases | |
on: | |
push: | |
tags: [ 'v*.*.*' ] | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-and-push-base-ops: | |
runs-on: ubuntu-latest | |
name: Build and push vre-base-ops image | |
strategy: | |
matrix: | |
container: [ | |
'base-ops' | |
] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Docker Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Log in to the GH Container Registry | |
id: login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for ${{ matrix.container }} | |
id: metadata | |
uses: docker/[email protected] | |
with: | |
flavor: | | |
latest=true | |
tags: | | |
type=ref,event=tag | |
# ghcr.io/vre-hub/{vre}-{base-ops}:{tag} | |
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.container }} | |
- name: Build and push ${{ matrix.container }} | |
id: build | |
uses: docker/[email protected] | |
with: | |
context: containers/${{ matrix.container }} | |
file: containers/${{ matrix.container }}/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
build-args: | | |
BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%SZ') | |
build-and-push-container: | |
needs: build-and-push-base-ops | |
runs-on: ubuntu-latest | |
name: Build and push vre operation images | |
strategy: | |
matrix: | |
context: [ | |
'iam-reana-sync', | |
'iam-rucio-sync', | |
'rucio-client', | |
'rucio-noise', | |
] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Docker Checkout | |
uses: actions/checkout@v4 | |
- name: Get tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Check env output | |
run: echo "tag" is ${{ env.RELEASE_VERSION }} | |
- name: Log in to the GH Container Registry | |
id: login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for ${{ matrix.context }} | |
id: metadata | |
uses: docker/[email protected] | |
with: | |
flavor: | | |
latest=true | |
tags: | | |
type=ref,event=tag | |
# ghcr.io/vre-hub/{vre}-{container_name}:{tag} | |
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.context }} | |
- name: Build and push ${{ matrix.context }} | |
id: build | |
uses: docker/[email protected] | |
with: | |
context: containers/${{ matrix.context }} | |
file: containers/${{ matrix.context }}/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
build-args: | | |
BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%SZ') | |
TAG=${{ env.RELEASE_VERSION }} | |