Skip to content

code(connector/server) - add injection into json body + headers key #101

code(connector/server) - add injection into json body + headers key

code(connector/server) - add injection into json body + headers key #101

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.23.0
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Set env
id: set_env
run: echo "RELEASE_VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Get dependencies
run: go mod download
- name: Run test
run: go test ./pkg/...
- name: Release to Github
run: |
./scripts/build.bash fitter fitter_${{ steps.set_env.outputs.RELEASE_VERSION }}
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_${{ steps.set_env.outputs.RELEASE_VERSION }}-linux-arm64
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_${{ steps.set_env.outputs.RELEASE_VERSION }}-darwin-amd64
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_${{ steps.set_env.outputs.RELEASE_VERSION }}-windows-amd64.exe
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_${{ steps.set_env.outputs.RELEASE_VERSION }}-linux-amd64
./scripts/build.bash cli fitter_cli_${{ steps.set_env.outputs.RELEASE_VERSION }}
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_cli_${{ steps.set_env.outputs.RELEASE_VERSION }}-linux-arm64
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_cli_${{ steps.set_env.outputs.RELEASE_VERSION }}-darwin-amd64
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_cli_${{ steps.set_env.outputs.RELEASE_VERSION }}-windows-amd64.exe
./scripts/git_release.sh github_api_token=${{ secrets.RELEASE_TOKEN }} owner=PxyUp repo=fitter tag=${{ steps.set_env.outputs.RELEASE_VERSION }} filename=./bin/fitter_cli_${{ steps.set_env.outputs.RELEASE_VERSION }}-linux-amd64
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Release to Docker Linux-Arm64
run: |
DOCKER_TAG=ghcr.io/pxyup/fitter:${{ steps.set_env.outputs.RELEASE_VERSION }}-linux-arm64
docker buildx build --platform linux/arm64 -t ${DOCKER_TAG} --build-arg FITTER_CLI_VERSION=${{ steps.set_env.outputs.RELEASE_VERSION }} .
docker login ghcr.io --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.TOKEN }} && docker push ${DOCKER_TAG}