Skip to content

Add a script to push #43

Add a script to push

Add a script to push #43

Workflow file for this run

# This workflow creates docker images that are then used for:
#
# - Key4hep packages CI
#
# All created images are then uploaded to GitHub Container registry
name: Create images
on:
push:
workflow_dispatch:
jobs:
# Image for running key4hep
build:
strategy:
matrix:
image: ["centos7", "alma9", "ubuntu22"]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build
run: |
echo $PWD
ls -l
cd Docker/${{ matrix.image }}
./build.sh
- name: tag
run: |
docker tag ${{ matrix.image }} ghcr.io/key4hep/key4hep-images/${{ matrix.image }}:latest
docker tag ${{ matrix.image }}-cvmfs ghcr.io/key4hep/key4hep-images/${{ matrix.image }}-cvmfs:latest
- name: show
run: docker images
- name: login and push
env:
deploy_secret: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -z ${deploy_secret} ]; then
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker push ghcr.io/key4hep/key4hep-images/${{ matrix.image }}:latest;
docker push ghcr.io/key4hep/key4hep-images/${{ matrix.image }}-cvmfs:latest;
else
echo "Skipping deploy no secrets present";
fi