Skip to content

Commit

Permalink
fix ghcr repo name
Browse files Browse the repository at this point in the history
must be lowercase
  • Loading branch information
fnattino authored Feb 29, 2024
1 parent 650da78 commit ded1d5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ jobs:
- name: build image
run: singularity build container.sif .github/apptainer/conda_environment.def

# container registries require lowercase repo names.
# https://github.com/orgs/community/discussions/25768
- name: lowercase repo name
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

# https://hsf-training.github.io/hsf-training-singularity-webpage/09-bonus-episode/index.html
- name: push to registry
run: |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${{ github.ref_name }}
singularity push container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:latest
singularity push container.sif oras://ghcr.io/${REPO}:${{ github.ref_name }}
singularity push container.sif oras://ghcr.io/${REPO}:latest

0 comments on commit ded1d5e

Please sign in to comment.