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

CI Build #73

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: GEMINI CAOM-2 image build

on:
release:

jobs:
#
# Package jobs
#
package:
uses: ./.github/workflows/docker.yml
secrets: inherit
with:
name: gem2caom2
#
# End Package Jobs
#
51 changes: 51 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker build and push workflow

env:
# Allow the set-env command below
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

on:
workflow_call:
inputs:
name:
required: true
type: string
secrets:
CI_REGISTRY_USER:
required: true
CI_REGISTRY_TOKEN:
required: true
CI_REGISTRY_ORGANIZATION:
required: true

jobs:
docker-build-publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_TOKEN }}
-
name: Set Docker tag
run: |
_TS_TAG=$(date +'%Y%m%d%H%M')
echo "::set-env name=TS_TAG::$_TS_TAG"
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ secrets.CI_REGISTRY_ORGANIZATION }}/${{ inputs.name }}:latest, ${{ secrets.CI_REGISTRY_ORGANIZATION }}/${{ inputs.name }}:${{ env.TS_TAG }}