-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,44 +79,44 @@ jobs: | |
env: | ||
BAKE_METADATA: ${{ steps.build-upload.outputs.metadata }} | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
needs: build | ||
|
||
steps: | ||
|
||
- name: Checkout Repo ⚡️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry 🔑 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run container checking libraries exist in the container | ||
run: | | ||
docker run --rm ${{ needs.build.outputs.image }} /bin/bash -c "ls -l /usr/local" > /tmp/ls-l.txt | ||
if grep -q libxc /tmp/ls-l.txt; then | ||
echo "libxc found" | ||
else | ||
echo "libxc not found" | ||
exit 1 | ||
fi | ||
if grep -q lapack /tmp/ls-l.txt; then | ||
echo "lapack found" | ||
else | ||
echo "lapack not found" | ||
exit 1 | ||
fi | ||
#test: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 30 | ||
# needs: build | ||
|
||
# steps: | ||
|
||
# - name: Checkout Repo ⚡️ | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Login to GitHub Container Registry 🔑 | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Run container checking libraries exist in the container | ||
# run: | | ||
# docker run --rm ${{ needs.build.outputs.image }} /bin/bash -c "ls -l /usr/local" > /tmp/ls-l.txt | ||
# if grep -q libxc /tmp/ls-l.txt; then | ||
# echo "libxc found" | ||
# else | ||
# echo "libxc not found" | ||
# exit 1 | ||
# fi | ||
|
||
# if grep -q lapack /tmp/ls-l.txt; then | ||
# echo "lapack found" | ||
# else | ||
# echo "lapack not found" | ||
# exit 1 | ||
# fi | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
needs: [build, test] | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
registry: ["docker.io", "ghcr.io"] | ||
|
@@ -162,16 +162,27 @@ jobs: | |
type=raw,value=lapack-${{ env.LAPACK_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} | ||
type=match,pattern=v(\d{4}\.\d{4}(-.+)?),group=1 | ||
- name: Determine source image | ||
id: images | ||
- name: Parse digest name | ||
id: parse_digest | ||
run: | | ||
echo "output=$(echo '${{ needs.build.outputs.image }}' | jq -r 'split("@") | {repository: .[0], digest: (.[1] | split(":")[1])}' | jq -c)" | tee -a "${GITHUB_OUTPUT}" | ||
- name: Pull, tag and push | ||
id: retag | ||
run: | | ||
src=$(echo '${{ inputs.images }}'| jq -cr '.[("${{ matrix.target }}"|ascii_upcase|sub("-"; "_"; "g")) + "_IMAGE"]') | ||
echo "src=$src" | tee -a "${GITHUB_OUTPUT}" | ||
repository=$(echo ${{ steps.parse_digest.outputs.output }} | jq -r '.repository') | ||
digest=$(echo ${{ steps.parse_digest.outputs.output }} | jq -r '.digest') | ||
docker pull ${{ needs.build.outputs.image }} | ||
docker tag ${{ needs.build.outputs.image }} ${repository}:${digest} | ||
docker push ${repository}:${digest} | ||
echo "temp_tag=${repository}:${digest}" | tee -a "${GITHUB_OUTPUT} | ||
- name: Push image | ||
- name: Push tags | ||
uses: akhilerm/[email protected] | ||
with: | ||
src: ${{ needs.build.outputs.image }} | ||
src: ${{ steps.retage.outputs.temp_tag }} | ||
dst: ${{ steps.meta.outputs.tags }} | ||
|
||
- name: Docker Hub Description | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters