Skip to content

fix singularity pull #3

fix singularity pull

fix singularity pull #3

Workflow file for this run

name: Build & Deploy Docker Containers
on:
push:
branches:
- main
release:
types: [published]
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
build-test-deploy-docker:
runs-on: ubuntu-latest
env:
registry: ghcr.io
strategy:
fail-fast: false
matrix:
dockerfile: ["matlab/Dockerfile", "octave/Dockerfile"]
name: Build ${{ matrix.dockerfile }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Container
run: |
tag=docker-$(basename $(dirname ${{ matrix.dockerfile }}))
docker build -f ${{ matrix.dockerfile }} -t ${{ env.registry }}/${GITHUB_REPOSITORY}:${tag} .
docker images
- name: Log in to GitHub Container Registry
if: |
(github.event_name != 'pull_request') &&
(github.repository_owner == 'spm')
uses: docker/login-action@v3
with:
registry: ${{ env.registry }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Container
if: |
(github.event_name != 'pull_request') &&
(github.repository_owner == 'spm')
run: |
docker push ${{ env.registry }}/${GITHUB_REPOSITORY} --all-tags