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

Automatically push docker images during release CI/CD #60

Merged
merged 2 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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