-
-
Notifications
You must be signed in to change notification settings - Fork 11
84 lines (72 loc) · 2.55 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Release
id: release
uses: google-github-actions/release-please-action@v4
with:
release-type: rust
package-name: proksi
- name: Setup Go
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-go@v5
- name: Setup Rust
if: ${{ steps.release.outputs.release_created }}
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Setup Cross
if: ${{ steps.release.outputs.release_created }}
run: |
cargo install cross --git https://github.com/cross-rs/cross
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v3
with:
ref: ${{ steps.release.outputs.tag_name }}
- name: Set up Docker Buildx
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-qemu-action@v2
- name: Login to Docker Hub
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Go Release
if: ${{ steps.release.outputs.release_created }}
uses: goreleaser/goreleaser-action@v4
env:
GITHUB_TOKEN: ${{ github.token }}
with:
distribution: goreleaser
version: latest
args: release
- name: Replace The Relative Path In The README.md
if: ${{ steps.release.outputs.release_created }}
run: |
sed -E 's#(\[[^]]*\])\(\.\/([^)]+)\)#\1(https://github.com/${{ github.repository }}/raw/${{ steps.release.outputs.tag_name }}/\2)#g' README.md > docker.README.md
- name: Update Docker Images Description
if: ${{ steps.release.outputs.release_created }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: luizfonseca/proksi
short-description: LoadBalancer and HTTP Proxy with automatic SSL
readme-filepath: docker.README.md
# endregion Docker