Skip to content

Commit

Permalink
Push built containers to registry (#38)
Browse files Browse the repository at this point in the history
* atlanteco notebook

* fixing leafmap rendering

* rename and clean notebook

* adds workflow step to push built image to quay.io

* fix actions var scope

* switch to docker provided action

* different format of github ref name

* push using docker cli instead of build-push action

* adds release workflow

---------

Co-authored-by: Ekaterina Sakharova <[email protected]>
  • Loading branch information
SandyRogers and KateSakharova authored Sep 26, 2023
1 parent 549317b commit ee18e8f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
push:
branches:
- main
- 'static-docs'

permissions:
contents: read
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Dockerfile
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
load: true
push: false
tags: quay.io/microbiome-informatics/emg-notebooks.dev:latest

- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Push
run: |
docker tag quay.io/microbiome-informatics/emg-notebooks.dev:latest quay.io/microbiome-informatics/emg-notebooks.dev:${{ github.ref_name }}
docker push quay.io/microbiome-informatics/emg-notebooks.dev:${{ github.ref_name }}
24 changes: 21 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ jobs:
run: npm install

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build Dockerfile
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
load: true
push: false
tags: quay.io/microbiome-informatics/emg-notebooks.dev:latest

- name: Run tests
Expand All @@ -62,4 +63,21 @@ jobs:
path: |
tests/launching_jl.png
tests/shiny_proxy_launched.png
tests/jl_launched.png
tests/jl_launched.png
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Push
run: |
docker tag quay.io/microbiome-informatics/emg-notebooks.dev:latest quay.io/microbiome-informatics/emg-notebooks.dev:${{ github.ref_name }}
docker push quay.io/microbiome-informatics/emg-notebooks.dev:${{ github.ref_name }}
- name: Push latest
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
run: |
docker push quay.io/microbiome-informatics/emg-notebooks.dev:latest

0 comments on commit ee18e8f

Please sign in to comment.