Skip to content

let it write

let it write #15

Workflow file for this run

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build_apptainer:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: make commit-based sif name
run: |
echo "sif_name=degauss-geocoder_${{ github.sha }}.sif" >> $GITHUB_ENV
echo "sif_version=${{ github.sha }}" >> $GITHUB_ENV
- name: if a release, make a tag-based sif name
if: github.event_name == 'release'
run: |
echo "sif_name=degauss-geocoder_${{ github.ref_name }}.sif" >> $GITHUB_ENV
echo "sif_version=${{ github.ref_name }}" >> $GITHUB_ENV
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.3
- name: build apptainer
run: apptainer build --force ${{ env.sif_name }} degauss-geocode.def
- name: push to ghcr
run: |
apptainer registry login --username cole-brokamp --password ${{ secrets.GITHUB_TOKEN }} docker://ghcr.io
apptainer push ${{ env.sif_name }} oras://ghcr.io/${{ github.repository }}:${{ env.sif_version }}