From 7b01e955aa7bd2732bb8ef53c24efad9d6347aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 5 Feb 2024 14:07:50 -0300 Subject: [PATCH] README: document CI workflow for IOC images. --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 9121d19..e37ac43 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,11 @@ Packages essential to all (or most) IOCs should be added to [this repository's The template above assumes the containers will be uploaded to the GitHub registry. +`:${TAG}` adds versioning to images using [our CI workflows](#ci-workflows), +and when building images locally and exporting the `TAG` environment variable. +If there is no interest in using versioned images and the resulting container +image should be tagged as `latest`, `:${TAG}` can simply be omitted. + ### areaDetector IOCs `areaDetector` IOCs must be built with target `dynamic-link`. In addition, they @@ -80,6 +85,34 @@ module depends on it. Known build and runtime issues are documented in the [SwC wiki](http://swc.lnls.br/). +## CI Workflows + +Users of this repository for building IOC images can also take advantage of +pre-defined continuous integration workflows in order to verify that images are +built correctly after changes, and for uploading container images to the +desired registry on Git tag creation. + +### GitHub Actions + +A YAML file must be added to the repository's `.github/workflows/` directory +(e.g. `.github/workflows/build.yml`), with the following contents: + +``` +name: Build image +on: + push: + tags: + - 'v*' + pull_request: + +jobs: + build_and_push: + permissions: + packages: write + contents: read + uses: cnpem/epics-in-docker/.github/workflows/ioc-images.yml +``` + ## Containers ### Accessing `iocsh` inside containers