Deploy Docker Image Workflow
This GitHub Actions workflow automates the deployment of Docker
images based on changes in the DESCRIPTION
file. It is
designed to run on pushes to the main
branch, manual
triggers, and on a schedule (every day at midnight UTC on Wednesdays and
Sundays). Note : this workflow is using InsightsEngineering
R image creator action.
Matrix
- R versions are specified in the matrix for parallel execution.
matrix:
r_version: ['release', 'devel', 'oldrel']
Workflow Structure
The workflow consists of three jobs: get_old_release
,
deploy-image
, and store_deps
.
get_old_release
Job
This job retrieve the R version corresponding to “oldrelease”. It
contains only a simple step parsing OLD_RELEASE
env
variable. This variable is set up manually (checking actual release
version of R and taking the previous version). Another workflow (with
cron workflow) is running in admiralci to check if a new release of R is
available (this allow admiralci developers to check if they need to
update OLD_RELEASE
variable).
deploy-image
Job
This job deploys Docker images based on the specified configurations. By the end of this job, the following images will be created and stored in admiralci ghcr (github container registry) :
- admiralci-release
- admiralci-devel
- admiralci-oldrel
The images are available in admiralci ghcr.
store_deps
Job
This job create admiralci release artifacts, for each docker image ()
Steps
- Store deps into CSV file: Retrieves installed packages for each image, and stores them in a CSV file.
- Upload deps.csv artifact: Uploads the CSV file containing dependencies as an artifact.
- Delete current release existing artifacts Delete admiralci existing release artifacts (this is necessary before the step bellow)
- Upload SBOM to release 🔼 Upload admiralci release artifacts
The output artifacts are available in admiralci
latest release. These artifacts allow developers to retrieve
versions of installed dependencies in the workflows, to ensure
reproducibility locally. But note that dependencies artifacts are also
produced during R CMD CHECKS
workflow.