This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Don't release on push to main - Release on release w/ versions
- Loading branch information
Stan Rozenraukh
committed
Nov 15, 2021
1 parent
4d0e70a
commit 218eedf
Showing
2 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push to DockerHub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Hermit | ||
run: ./bin/hermit env -r >> $GITHUB_ENV | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Extract metadata (tags, labels) | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: cashapp/cmmc | ||
tags: | | ||
type=semver,pattern=v{{version}} | ||
- name: Build and push Docker image | ||
id: build_push | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
- name: Image digest | ||
run: echo ${{ steps.build_push.outputs.digest }} |