-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (32 loc) · 1.12 KB
/
deploy-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Create and publish container images
on: push
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-apptainer:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup apptainer executable
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.3
- name: Build an apptainer image
run: apptainer build --build-arg PYBIOCLIP_VERSION=1.0.0 apptainer.sif apptainer.def
- name: Create lowercase image name
id: lc_image_name
run: |
echo "IMAGE_NAME=$(echo ${{ env.IMAGE_NAME}} | awk '{print tolower($0)}')"
- name: Publish apptainer image
run: apptainer push apptainer.sif oras://${{ env.REGISTRY }}/${{ steps.lc_image_name.outputs.IMAGE_NAME }}-sif:1.0.0