Skip to content

Commit

Permalink
Merge d7a7127 into e57f3ae
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Feb 10, 2022
2 parents e57f3ae + d7a7127 commit 351f6fe
Show file tree
Hide file tree
Showing 7 changed files with 468 additions and 423 deletions.
116 changes: 0 additions & 116 deletions .github/workflows/check-quizzes.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
# Candace Savonen Apr 2021

name: Build of Docker
name: Build Docker


#---TRIGGER-START---#
on:
release:
types:
- created
pull_request:
branches: [ main, staging ]
paths: [ docker/Dockerfile, docker/github_package_list.tsv ]
workflow_dispatch:
inputs:
dockerhubpush:
description: 'Push to Dockerhub?'
required: true
default: 'false'
#---TRIGGER-END----#

jobs:
build-docker:
name: Build Docker image
runs-on: ubuntu-latest

steps:
Expand All @@ -33,18 +25,15 @@ jobs:
git config --local user.name "jhudsl-robot"
- name: Don't re-test if this is a sync branch
if: ${{ github.head_ref == 'repo-sync/OTTR_Template/default' }}
run: |
echo This was tested on OTTR_Template no need to re-run
# Set up Docker build
- name: Set up Docker Buildx
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/setup-buildx-action@v1

# Setup layer cache
- name: Cache Docker layers
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
Expand All @@ -58,12 +47,10 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Get token
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
run: echo ${{ secrets.GH_PAT }} > docker/git_token.txt

# Build docker image
- name: Build Docker image
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
uses: docker/build-push-action@v2
with:
push: false
Expand All @@ -86,14 +73,6 @@ jobs:
run: docker push jhudsl/course_template

- name: Get the version
if: ${{ github.head_ref != 'repo-sync/OTTR_Template/default' }}
id: get_version
run: |
echo ::set-output name=version::$(echo $GITHUB_REF | cut -d / -f 3)
# Push the Docker image if it is a release
- name: Push Docker image if release
if: ${{ github.event_name == 'release' }}
run: |
docker tag jhudsl/course_template:latest jhudsl/course_template:${{ steps.get_version.outputs.version }}
docker push jhudsl/course_template:${{ steps.get_version.outputs.version }}
Loading

0 comments on commit 351f6fe

Please sign in to comment.