Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Feb 22, 2024
1 parent 178eed0 commit e74f2ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
cache:
default: true
description: "Whether to use cache"
tags:
default: ""
description: "Additional tags"
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -61,5 +64,6 @@ runs:
IMAGE_TAG=${{ steps.info.outputs.sha }}
tags: |
ghcr.io/pdidev/test_env/${{ inputs.image-name }}${{ steps.info.outputs.sep }}${{ steps.info.outputs.sha }}
${{ inputs.tags }}
context: "{{defaultContext}}:${{ inputs.path }}"
push: true
16 changes: 7 additions & 9 deletions .github/workflows/debuntu_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:
variant: ['mini', 'all', 'pdi']
runs-on: ubuntu-latest
steps:
- name: Compute distro & version
- name: Compute tags, distro & version
id: info
run: |
if [ 'true' = "${{ github.event_name == 'push' || github.event_name == 'schedule' }}" ]
then
echo "tags=ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
fi
BASE="${{ matrix.base }}"
echo "distro=${BASE%/*}" >> "${GITHUB_OUTPUT}"
echo "distro_version=${BASE##*/}" >> "${GITHUB_OUTPUT}"
Expand All @@ -32,11 +36,5 @@ jobs:
MPI=${{ matrix.mpi }}
DISTRO=${{ steps.info.outputs.distro }}
DISTRO_VERSION=${{ steps.info.outputs.distro_version }}
- name: Publish tagged
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
run: |
DOCKER_TAG="${{github.ref_name}}"
docker tag \
ghcr.io/pdidev/test_env/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${GITHUB_SHA:0:7} \
ghcr.io/pdidev/test_env/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{github.ref_name}}
docker push ghcr.io/pdidev/test_env/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{github.ref_name}}
tags: |
${{ steps.info.outputs.tags }}
13 changes: 7 additions & 6 deletions .github/workflows/spack_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@ jobs:
needs: step6_optlibs
runs-on: ubuntu-latest
steps:
- name: "Compute tags"
id: info
run: |
if [ 'true' = "${{ github.event_name == 'push' || github.event_name == 'schedule' }}" ]
then
echo "tags=ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }}:${{github.ref_name}}" >> "${GITHUB_OUTPUT}"
fi
- name: "Build and push"
uses: pdidev/test_env/.github/actions/build@v3
with:
Expand All @@ -233,9 +240,3 @@ jobs:
COMPILER=${{ matrix.compiler }}
MPI=${{ matrix.mpi }}
LIBS=${{ matrix.level }}
- name: Publish tagged
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
run: |
DOCKER_TAG="${{github.ref_name}}"
docker tag ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }} ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }}:${{github.ref_name}}
docker push ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }}:${{github.ref_name}}

0 comments on commit e74f2ca

Please sign in to comment.