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

Commit

Permalink
Releasing...
Browse files Browse the repository at this point in the history
- 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
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ jobs:
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: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -62,7 +57,7 @@ jobs:
with:
context: ./
file: ./Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
push: false
tags: cashapp/cmmc:${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit 218eedf

Please sign in to comment.