1. Build dspace-source image #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: 1. Build dspace-source image | |
on: | |
workflow_dispatch: # This allows to kick-off the action manually from GitHub Actions | |
inputs: | |
source_image_tag: | |
description: Source Image Tag | |
required: true | |
default: umich | |
type: choice | |
options: | |
- umich | |
- issue-working | |
jobs: | |
build: | |
name: source:${{ github.event.inputs.source_image_tag }} | |
runs-on: ubuntu-latest | |
# Ensure this job only executed for 'mlibrary/dspace-containerization' | |
if: github.repository == 'mlibrary/dspace-containerization' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push dspace-source image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: 'ghcr.io/mlibrary/dspace-containerization/dspace-source:${{ github.event.inputs.source_image_tag }}' | |
file: Dockerfile | |
build-args: | | |
GITHUB_BRANCH=${{ github.event.inputs.source_image_tag }} |