Skip to content
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/image-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and publish the docker image

# manual trigger event
on: workflow_dispatch

# working parameters that are specific to this script
env:
REGISTRY: containers.renci.org/irods/

# job definition
jobs:
# create a job
Build-and-publish-image:
runs-on: ubuntu-latest
permissions:
contents: read

# create an array of operating systems to build. this is a list of the directories that have a dockerfile
strategy:
matrix:
os_name:
- almalinux-8
- centos-7
- debian-11
- debian-12
- rockylinux-8
- rockylinux-9
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04

# job steps
steps:
# connect to the renci image registry
- name: Login to containers.renci.org
uses: docker/login-action@v2
with:
registry: ${{ secrets.CR_HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PW }}

# checkout the codebase
- name: Checkout
uses: actions/checkout@v1

# build and push the image. The docker v3 action automatically handles the git checkout.
- name: Build/Push the image to the registry
uses: docker/build-push-action@v3
with:
context: ./projects/${{ matrix.os_name }}
file: ./projects/${{ matrix.os_name }}/Dockerfile
push: true
tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest