Skip to content

Commit

Permalink
New release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Mar 2, 2024
1 parent 3839da7 commit 6a96d09
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
release:
published:

env:
REGISTRY: ghcr.io/
Expand Down Expand Up @@ -44,13 +42,12 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}${{ env.ISPG_IMAGE }}
# Before tests pass, we tag the image by 'tip' to indicate latest build,
# and by pull request number, e.g. pr-11
# Before tests pass, we tag the image by the branch name
# or by pull request number, e.g. pr-11
# https://github.com/docker/metadata-action#tags-input
# See the release workflow for the release tags.
# TODO: Figure out a better solution rather than using 'tip' tag
tags: |
type=raw,value=tip # Must be here so we have at least one tag
type=ref,event=branch
type=ref,event=pr
- name: Build image
Expand Down Expand Up @@ -92,7 +89,7 @@ jobs:

release:
if: >-
github.repository == 'ispg-group/aiidalab-ispg-docker-stack'
github.repository_owner == 'ispg-group'
&& (github.ref_type == 'tag' || github.ref_name == 'main')
needs:
- build
Expand Down Expand Up @@ -127,9 +124,3 @@ jobs:
with:
src: ${{ env.REGISTRY }}${{ env.ISPG_IMAGE }}@${{ needs.build.outputs.image_digest }}
dst: ${{ steps.meta.outputs.tags }}

- uses: softprops/[email protected]
name: Create release
if: startsWith(github.ref, 'refs/tags/v')
with:
generate_release_notes: true
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ The following extra things are added on top of the `docker.io/aiidalab/full-stac

Original image is generated and published on DockerHub at <https://github.com/aiidalab/aiidalab-docker-stack>

## (dev) Releasing a new image

We use bumpver to handle the release automation:

```console
pipx install bumpver
git switch main && git pull origin main
# Check the changes first with a dry run
bumpver update --dry
bumpver update
```

This will create a release commit, tag it, and push it.
Once you see the build and tests pass, create a release for the new tag in GitHub UI at

https://github.com/ispg-group/aiidalab-ispg-docker-stack/releases/new

This will trigger a new workflow that should do a new build and push the new `latest` image.

## Creating your own SSL certificates for HTTPS

To get a proper certificate from a trusted Certificate Authority (CA),
Expand Down

0 comments on commit 6a96d09

Please sign in to comment.