Skip to content

Commit

Permalink
workflow: run goreleaser on tag push
Browse files Browse the repository at this point in the history
push images to docker.io and ghcr.io
update docker.io readme
  • Loading branch information
aymanbagabas committed Nov 17, 2021
1 parent 8619bf2 commit 29794a6
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: goreleaser

on:
push:
tags:
- '*'

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.17

- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io/charmcli
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Docker Hub Readme
uses: christian-korneck/update-container-description-action@v1
with:
destination_container_repo: charmcli/soft-serve
provider: dockerhub
short_description: "A tasty Git server 🍦"
readme_file: "README.md"

0 comments on commit 29794a6

Please sign in to comment.