You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Create and publish the PyStemmusScope container image 📦
3
+
4
+
on:
5
+
release:
6
+
types: [published]
7
+
workflow_dispatch:
8
+
9
+
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
10
+
env:
11
+
REGISTRY: ghcr.io
12
+
IMAGE_NAME: ${{ github.repository }}
13
+
14
+
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
15
+
jobs:
16
+
build-and-push-image:
17
+
runs-on: ubuntu-latest
18
+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
19
+
permissions:
20
+
contents: read
21
+
packages: write
22
+
attestations: write
23
+
id-token: write
24
+
#
25
+
steps:
26
+
- name: Checkout repository
27
+
uses: actions/checkout@v4
28
+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
36
+
- name: Extract metadata (tags, labels) for Docker
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
42
+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
43
+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
should be released that is compatible with the new BMI implementation. A new
185
+
release usually includes a new tag. Then, you need to update the
186
+
`compatible_tags` variable of the class `StemmusScopeDocker` in
187
+
`PyStemmusScope/bmi/docker_process.py`.
188
+
189
+
## Making a release
190
+
191
+
This section describes how to make a release in 3 parts:
192
+
193
+
1. preparation
194
+
1. making a release on GitHub
195
+
196
+
### (1/2) Preparation
197
+
198
+
1. Update the <CHANGELOG.md> (don't forget to update links at bottom of page)
199
+
2. Verify that the information in `CITATION.cff` is correct, and that `.zenodo.json` contains equivalent data
200
+
3. Make sure the version has been updated.
201
+
4. Run the unit tests with `pytest -v`
202
+
203
+
### (2/2) GitHub
65
204
66
-
<!-- markdown-link-check-disable-next-line -->
67
-
To contribute to the STEMMUS_SCOPE model, you need access to the model source code that is stored in the repository [STEMMUS_SCOPE](https://github.com/EcoExtreML/STEMMUS_SCOPE).
0 commit comments