Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Automatically push docker images during release CI/CD (#60)
Browse files Browse the repository at this point in the history
* Automatically push docker images during release CI/CD

* fetch tags during pre-release
  • Loading branch information
VJftw authored Oct 19, 2020
1 parent 698fa48 commit b709e8c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./pleasew run //scripts:pre-release

- name: Publish Docker images
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: ./pleasew run //scripts:publish-images
5 changes: 2 additions & 3 deletions docs/contributers/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ This lets us use `git desribe` to give us a descriptive version from any commit

## Creating a Release

1. Tag the commit you would like to release from `master` and push the tags:
1. Tag the commit you would like to release from `master` and push the tags. This will trigger a GitHub workflow that creates a pre-release and pushes Docker images:
```
git fetch --tags
git tag --annotate <version> --message "<version>"
git push origin --tags
```
2. Build and publish the release Docker images to Docker Hub by running `./pleasew run //scripts:publish-images`
3. In the GitHub web interface, you can then promote the new pre-release to a release
2. Once satisfied, promote the new pre-release to a release.
1 change: 1 addition & 0 deletions scripts/pre-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -euo pipefail

git fetch --tags --force
version=$(git describe --always)

github_api_version="application/vnd.github.v3+json"
Expand Down

0 comments on commit b709e8c

Please sign in to comment.