forked from go-acme/lego
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
195 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
|
||
doc: | ||
name: Build and deploy documentation | ||
runs-on: ubuntu-latest | ||
env: | ||
GO_VERSION: 1.18 | ||
HUGO_VERSION: 0.54.0 | ||
CGO_ENABLED: 0 | ||
|
||
steps: | ||
|
||
# https://github.com/marketplace/actions/setup-go-environment | ||
- name: Set up Go ${{ env.GO_VERSION }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
# https://github.com/marketplace/actions/checkout | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# https://golangci-lint.run/usage/install#other-ci | ||
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} | ||
golangci-lint --version | ||
- name: Install Pebble and challtestsrv | ||
run: GO111MODULE=off go get -u github.com/letsencrypt/pebble/... | ||
|
||
- name: Set up a Memcached server | ||
uses: niden/actions-memcached@v7 | ||
|
||
- name: Setup /etc/hosts | ||
run: | | ||
echo "127.0.0.1 acme.wtf" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 lego.wtf" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 acme.lego.wtf" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 légô.wtf" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 xn--lg-bja9b.wtf" | sudo tee -a /etc/hosts | ||
- name: Make | ||
run: | | ||
make | ||
make clean | ||
- name: Install Hugo | ||
run: | | ||
wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb | ||
sudo dpkg -i /tmp/hugo.deb | ||
- name: Build Documentation | ||
run: make docs-build | ||
|
||
# https://github.com/marketplace/actions/github-pages | ||
- name: Deploy to GitHub Pages | ||
uses: crazy-max/ghaction-github-pages@v2 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: docs/public | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
|
||
release: | ||
name: Release version | ||
runs-on: ubuntu-latest | ||
env: | ||
GO_VERSION: 1.18 | ||
SEIHON_VERSION: v0.8.3 | ||
CGO_ENABLED: 0 | ||
|
||
steps: | ||
- name: Set up Go ${{ env.GO_VERSION }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
# https://goreleaser.com/ci/actions/ | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist --timeout=60m | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }} | ||
|
||
# Install Docker image multi-arch builder | ||
- name: Install Seihon ${{ env.SEIHON_VERSION }} | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sh -s -- -b $(go env GOPATH)/bin ${SEIHON_VERSION} | ||
seihon --version | ||
- name: Docker Login | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | ||
|
||
- name: Publish Docker Images (Seihon) | ||
run: make publish-images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters