Skip to content

Commit

Permalink
new workflow based on docker-blessed GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
lianos committed Dec 13, 2023
1 parent 729a322 commit 7d84fd3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-base-extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ jobs:
- uses: actions/checkout@master
- name: Publish base-extra to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@master
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
with:
name: facilebio/facilebio_base_extra
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: facilebio_base_extra
buildargs: GITHUB_PAT

3 changes: 3 additions & 0 deletions .github/workflows/build-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ jobs:
- uses: actions/checkout@master
- name: Publish base to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@master
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
with:
name: facilebio/facilebio_base
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: facilebio_base
buildargs: GITHUB_PAT
55 changes: 55 additions & 0 deletions .github/workflows/build-facielbio2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# https://josephrodriguezg.medium.com/build-and-publish-docker-images-with-github-actions-78be3b3fbb9b
# https://github.com/docker/build-push-action
name: Build final facilebio image
on:
push:
branches:
- '*'
paths:
- 'facilebio/**'
schedule:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
# https://crontab.guru/ to debug cron syntax
# run monday's and thursdays (1,4) at 5:00 AM Pacific Time (which is noon UTC)
- cron: '0 12 * * 1,4'
workflow_dispatch:
inputs:
dummy:
description: 'A dummy variable to enable manual workflow execution'
required: false
default: 'gitty up'
jobs:
build:
name: Build & push docker image
runs-on: ubuntu-latest
env:
IMG_NAME: facilebio/facilebio
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Debug
run: |
echo "GITHUB_TOKEN -> {{ secrets.GITHUB_TOKEN }}"
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v3
with:
images: ${{ env.IMG_NAME }}
tags: |
type=ref,event=branch
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.IMG_NAME }}:latest
context: facilebio
secret-envs: GITHUB_PAT={{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions facilebio_base/base-packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ crayon
crosstalk
curl
data.table
datamods
DBI
DESeq2
dbplyr
Expand Down Expand Up @@ -169,6 +170,8 @@ qs
R6
ragg
rappdirs
reactable
reactR
RBGL
RColorBrewer
RCurl
Expand All @@ -195,6 +198,7 @@ S4Vectors
scales
shape
shiny
shinybusy
shinycssloaders
shinydashboard
shinydashboardPlus
Expand All @@ -214,6 +218,7 @@ sva
sys
testthat
tibble
tictoc
tidyr
tidyselect
tinytex
Expand Down

0 comments on commit 7d84fd3

Please sign in to comment.