Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New containers ci #259

Merged
merged 4 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/workflows/docker-autobuild-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
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:
context: [
'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.environments }}
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.environments }}

- name: Build and push ${{ matrix.environments }}
id: build
uses: docker/[email protected]
with:
context: ./${{ matrix.environments }}
file: ./${{ matrix.environments }}/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%SZ')

build-and-push-container:
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.environments }}
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.environments }}

- name: Build and push ${{ matrix.environments }}
id: build
uses: docker/[email protected]
with:
context: ./${{ matrix.environments }}
file: ./${{ matrix.environments }}/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%SZ')
TAG=${{ env.RELEASE_VERSION }}


61 changes: 0 additions & 61 deletions .github/workflows/docker-base-ops.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/docker-iam-reana-sync.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/docker-iam-rucio-sync.yaml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/docker-rucio-client.yaml

This file was deleted.

Loading