Skip to content

fix: always the slash #27

fix: always the slash

fix: always the slash #27

Workflow file for this run

name: build-push
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
env:
## Application versions used for the main release
## note: nightly builds will always use the master/main branch
JUGGLER_VERSION: "v9.4.0"
EICRECON_VERSION: "v1.2.1"
## Dockerhub registry
DH_REGISTRY: docker.io
DH_REGISTRY_USER: eicweb
DH_PUSH: 0
## GitHub registry
GH_REGISTRY: ghcr.io
GH_REGISTRY_USER: eic
GH_PUSH: 0
jobs:
base:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- BASE_IMAGE: debian:testing-20220822-slim
BUILD_IMAGE: debian_testing_base
PLATFORM: linux/amd64,linux/arm64/v8
- BASE_IMAGE: ubuntu:20.04
BUILD_IMAGE: ubuntu_base
PLATFORM: linux/amd64,linux/arm64/v8
# - BASE_IMAGE: intel/oneapi-hpckit:2022.3.0-devel-ubuntu20.04
# BUILD_IMAGE: oneapi_base
# PLATFORM: linux/amd64
# - BASE_IMAGE: nvidia/cuda:11.8.0-devel-ubuntu20.04
# BUILD_IMAGE: cuda_base
# PLATFORM: linux/amd64
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ matrix.BUILD_IMAGE }}-${{ github.sha }}
restore-keys: |
${{ matrix.BUILD_IMAGE }}-
-
name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ env.DH_PUSH == '1' }}
with:
registry: ${{ env.DH_REGISTRY }}
username: ${{ env.DH_REGISTRY_USER }}
password: ${{ secrets.DH_EICWEB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ env.GH_REGISTRY_USER }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: containers/debian/base.Dockerfile
context: containers/debian
platforms: ${{ matrix.PLATFORM }}
push: false
tags: |
eicweb/${{ matrix.BUILD_IMAGE }}:test
ghcr.io/eic/${{ matrix.BUILD_IMAGE }}:test
build-args: |
BASE_IMAGE=${{ matrix.BASE_IMAGE }}
BUILD_IMAGE=${{ matrix.BUILD_IMAGE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
-
name: Move cache
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
dev:
runs-on: ubuntu-latest
needs: base
strategy:
matrix:
include:
- BASE_IMAGE: debian_testing_base
BUILD_IMAGE: jug_dev
PLATFORM: linux/amd64,linux/arm64/v8
# - BASE_IMAGE: oneapi_base
# BUILD_IMAGE: jug_dev_oneapi
# PLATFORM: linux/amd64
# - BASE_IMAGE: cuda_base_new
# BUILD_IMAGE: jug_dev_cuda
# PLATFORM: linux/amd64
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Load spack version and cherry-picks
id: spack
shell: bash
run: |
source spack.sh
echo "orgrepo=${SPACK_ORGREPO}" | tee -a $GITHUB_OUTPUT
echo "version=${SPACK_VERSION}" | tee -a $GITHUB_OUTPUT
echo "cherrypicks=${SPACK_CHERRYPICKS//$'\n'/ }" | tee -a $GITHUB_OUTPUT
-
name: Load eic-spack version and cherry-picks
id: eicspack
run: |
source eicspack.sh
echo "orgrepo=${EICSPACK_ORGREPO}" | tee -a $GITHUB_OUTPUT
echo "version=${EICSPACK_VERSION}" | tee -a $GITHUB_OUTPUT
echo "cherrypicks=${EICSPACK_CHERRYPICKS//$'\n'/ }" | tee -a $GITHUB_OUTPUT
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ matrix.BUILD_IMAGE }}-${{ github.sha }}
restore-keys: |
${{ matrix.BUILD_IMAGE }}-
-
name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ env.DH_PUSH == '1' }}
with:
registry: ${{ env.DH_REGISTRY }}
username: ${{ env.DH_REGISTRY_USER }}
password: ${{ secrets.DH_EICWEB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ env.GH_PUSH == '1' }}
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ env.GH_REGISTRY_USER }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: containers/jug/dev.Dockerfile
context: containers/jug
platforms: ${{ matrix.PLATFORM }}
push: false
tags: |
eicweb/${{ matrix.BUILD_IMAGE }}:test
ghcr.io/eic/${{ matrix.BUILD_IMAGE }}:test
build-args: |
DOCKER_REGISTRY=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/
BASE_IMAGE=${{ matrix.BASE_IMAGE }}
BUILD_IMAGE=${{ matrix.BUILD_IMAGE }}
SPACK_ORGREPO=${{ steps.spack.outputs.orgrepo }}
SPACK_VERSION=${{ steps.spack.outputs.version }}
SPACK_CHERRYPICKS=${{ steps.spack.outputs.cherrypicks }}
EICSPACK_ORGREPO=${{ steps.eicspack.outputs.orgrepo }}
EICSPACK_VERSION=${{ steps.eicspack.outputs.version }}
EICSPACK_CHERRYPICKS=${{ steps.eicspack.outputs.cherrypicks }}
build-contexts: |
spack=.
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
-
name: Move cache
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache