-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worflow to build covid19-notebook-etl image (#257)
- Loading branch information
1 parent
85ecef9
commit eaa5bda
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build covid19-notebook-etl | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'covid19-notebooks/**' | ||
|
||
jobs: | ||
dockerBuild: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to Quay.io | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
- name: Extract branch name | ||
id: extract_branch | ||
shell: bash | ||
# get the branch name, and replace "/" with "_" | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr / _)" | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./covid19-notebooks | ||
file: ./covid19-notebooks/covid19-notebook-etl-Dockerfile | ||
push: true | ||
tags: quay.io/cdis/covid19-notebook-etl:${{ steps.extract_branch.outputs.branch }} | ||
cache-from: type=registry,ref=quay.io/cdis/covid19-notebook-etl:${{ steps.extract_branch.outputs.branch }} | ||
cache-to: type=inline |