29794a6db9321a5745a190bf78931bd79c0347fc
- Author
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Committer
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Date
Message
workflow: run goreleaser on tag push
push images to docker.io and ghcr.io
update docker.io readme
Diff
1diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml
2new file mode 100644
3index 0000000000000000000000000000000000000000..229f547746aae308222e1bbd9305f403082ee264
4--- /dev/null
5+++ b/.github/workflows/goreleaser.yml
6@@ -0,0 +1,54 @@
7+name: goreleaser
8+
9+on:
10+ push:
11+ tags:
12+ - '*'
13+
14+permissions:
15+ contents: write
16+
17+jobs:
18+ goreleaser:
19+ runs-on: ubuntu-latest
20+ steps:
21+ - name: Checkout
22+ uses: actions/checkout@v2
23+ with:
24+ fetch-depth: 0
25+
26+ - name: Set up Go
27+ uses: actions/setup-go@v2
28+ with:
29+ go-version: 1.17
30+
31+ - name: Login to DockerHub
32+ uses: docker/login-action@v1
33+ with:
34+ registry: docker.io/charmcli
35+ username: ${{ secrets.DOCKERHUB_USERNAME }}
36+ password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
38+ - name: Login to GitHub Container Registry
39+ uses: docker/login-action@v1
40+ with:
41+ registry: ghcr.io
42+ username: ${{ github.repository_owner }}
43+ password: ${{ secrets.GITHUB_TOKEN }}
44+
45+ - name: Run GoReleaser
46+ uses: goreleaser/goreleaser-action@v2
47+ with:
48+ distribution: goreleaser
49+ version: latest
50+ args: release --rm-dist
51+ env:
52+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+ - name: Update Docker Hub Readme
55+ uses: christian-korneck/update-container-description-action@v1
56+ with:
57+ destination_container_repo: charmcli/soft-serve
58+ provider: dockerhub
59+ short_description: "A tasty Git server 🍦"
60+ readme_file: "README.md"