Release 1.1.0 #1709
Workflow file for this run
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
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 5 * * *" # runs every day at 5am UTC | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.ref_name }}-ci | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
unit-test: | |
name: Unit Test | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: go.mod | |
- name: Run Unit Tests | |
run: make unit-test | |
build: | |
name: Build Client | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
if: ${{ github.event.repository.fork == false }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Switch Repository (Nightly) | |
if: (github.event_name == 'schedule') | |
run: | | |
sed -i 's|pkgs.nginx.com|pkgs-test.nginx.com|g' docker/Dockerfile | |
sed -i '16d' docker/Dockerfile | |
sed -i "17i sed -i 's|pkgs|pkgs-test|g' /etc/apt/apt.conf.d/90pkgs-nginx" docker/Dockerfile | |
sed -i 's|deb https|deb [trusted=yes] https|g' docker/Dockerfile | |
sed -i 's|\${NGINX_PLUS_VERSION}/||g' docker/Dockerfile | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | |
- name: Build Plus Docker Image | |
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 | |
with: | |
file: docker/Dockerfile | |
tags: nginx-plus | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
load: true | |
secrets: | | |
"nginx-repo.crt=${{ secrets.NGINX_CRT }}" | |
"nginx-repo.key=${{ secrets.NGINX_KEY }}" | |
- name: Test Client | |
run: | | |
docker compose up -d | |
docker compose logs -f test test-no-stream | |
- name: Create/Update Draft | |
uses: lucacome/draft-release@3ed3808cb75e4398e021a19a171ce62f4943f2f7 # v1.0.0 | |
id: release-notes | |
with: | |
minor-label: "enhancement" | |
major-label: "change" | |
publish: ${{ github.ref_type == 'tag' }} | |
collapse-after: 50 | |
if: ${{ github.event_name == 'push' }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }} | |
if: ${{ github.ref_type == 'tag' }} |