fix: rp routes appending '/' to upstream uri's; #358
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 and Push | |
| on: | |
| push: | |
| branches: ["main", "develop"] | |
| tags: ["v*.*.*"] | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine image tag | |
| id: vars | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| VERSION="${{ github.ref_name }}" | |
| echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:latest,ghcr.io/${{ github.repository_owner }}/podnest:${VERSION}" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
| echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:develop,ghcr.io/${{ github.repository_owner }}/podnest:dev" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then | |
| echo "TAGS=ghcr.io/${{ github.repository_owner }}/podnest:beta,ghcr.io/${{ github.repository_owner }}/podnest:${{ github.sha }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build and Push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.vars.outputs.TAGS }} | |
| build-args: | | |
| VERSION=${{ github.ref_name }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| release-pdnctl: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build pdnctl binaries | |
| run: | | |
| CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ | |
| -ldflags="-s -w -X podnest/internal/version.AppVersion=${{ github.ref_name }}" \ | |
| -o pdnctl-linux-amd64 ./cmd/pdnctl/ | |
| CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \ | |
| -ldflags="-s -w -X podnest/internal/version.AppVersion=${{ github.ref_name }}" \ | |
| -o pdnctl-linux-arm64 ./cmd/pdnctl/ | |
| - name: Create release and attach binaries | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| pdnctl-linux-amd64 | |
| pdnctl-linux-arm64 |