Add DNS-01 challenge providers for ACME SSL #885
Workflow file for this run
This file contains hidden or 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
| name: build | |
| on: | |
| push: | |
| branches: | |
| tags: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| docker system prune -af | |
| - name: set up go 1.25 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| id: go | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: build and test | |
| run: | | |
| go test -v -timeout=100s -p 1 -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... | |
| go build -race ./... | |
| cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "mocks" | grep -v "_mock" > $GITHUB_WORKSPACE/profile.cov | |
| working-directory: app | |
| env: | |
| TZ: "America/Chicago" | |
| - name: test examples | |
| run: | | |
| go test -race ./... | |
| go build -race ./... | |
| working-directory: examples/plugin | |
| env: | |
| TZ: "America/Chicago" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| - name: golangci-lint on example directory | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| args: --config ../../.golangci.yml | |
| working-directory: examples/plugin | |
| - name: install goveralls | |
| run: | | |
| go install github.com/mattn/goveralls@latest | |
| - name: submit coverage | |
| run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov | |
| env: | |
| COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: available platforms | |
| run: echo ${{ steps.buildx.outputs.platforms }} | |
| - name: build and deploy master image to ghcr.io and dockerhub | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| env: | |
| GITHUB_PACKAGE_TOKEN: ${{ secrets.PKG_TOKEN }} | |
| DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| USERNAME: ${{ github.actor }} | |
| GITHUB_SHA: ${{ github.sha}} | |
| GITHUB_REF: ${{ github.ref}} | |
| run: | | |
| ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)" | |
| echo GITHUB_REF - $ref | |
| echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin | |
| echo ${DOCKER_HUB_TOKEN} | docker login -u ${USERNAME} --password-stdin | |
| docker buildx build --push \ | |
| --build-arg CI=github --build-arg GITHUB_SHA=${GITHUB_SHA} --build-arg GIT_BRANCH=${ref} \ | |
| --platform linux/amd64,linux/arm/v7,linux/arm64 \ | |
| -t ghcr.io/${USERNAME}/reproxy:${ref} -t ${USERNAME}/reproxy:${ref} . | |
| - name: deploy tagged (latest) to ghcr.io and dockerhub | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| env: | |
| GITHUB_PACKAGE_TOKEN: ${{ secrets.PKG_TOKEN }} | |
| DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| USERNAME: ${{ github.actor }} | |
| GITHUB_SHA: ${{ github.sha}} | |
| GITHUB_REF: ${{ github.ref}} | |
| run: | | |
| ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)" | |
| echo GITHUB_REF - $ref | |
| echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin | |
| echo ${DOCKER_HUB_TOKEN} | docker login -u ${USERNAME} --password-stdin | |
| docker buildx build --push \ | |
| --build-arg CI=github --build-arg GITHUB_SHA=${GITHUB_SHA} --build-arg GIT_BRANCH=${ref} \ | |
| --platform linux/amd64,linux/arm/v7,linux/arm64 \ | |
| -t ghcr.io/${USERNAME}/reproxy:${ref} -t ghcr.io/${USERNAME}/reproxy:latest \ | |
| -t ${USERNAME}/reproxy:${ref} -t ${USERNAME}/reproxy:latest . |