Skip to content

Commit

Permalink
Add CI job to build and push latest images (#17)
Browse files Browse the repository at this point in the history
* Add CI job to build and push latest images

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Fix CI job title

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
  • Loading branch information
PrasadG193 committed May 7, 2021
1 parent 22f890d commit 918e49c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: goreleaser

on:
pull_request:
push:

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --skip-publish
env:
GORELEASER_CURRENT_TAG: latest
- name: Build and push latest image
if: success() && github.event_name == 'push' && endsWith(github.ref ,'main')
run: |
docker login ghcr.io -u ${{ secrets.GITHUB_USERNAME }} -p ${{ secrets.GITHUB_TOKEN }}
docker push ghcr.io/prasadg193/covaccine-notifier:latest

0 comments on commit 918e49c

Please sign in to comment.