diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 3a38b9f..34be8d3 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -5,8 +5,7 @@ on: - main # Trigger on version tags tags: - - 'v[0-9]+\.[0-9]+\.[0-9]+' - - 'v[0-9]+\.[0-9]+\.[0-9]+-rc(?:[0-9]+|\.[0-9]+)' + - "v*" pull_request: merge_group: workflow_dispatch: @@ -24,29 +23,11 @@ on: - major jobs: - setup: - runs-on: ubuntu-latest - env: - # use consistent go version throughout pipeline here - GO_VERSION: "1.21" - outputs: - go-version: ${{ steps.set-vars.outputs.go-version }} - steps: - - name: Set go version - id: set-vars - run: echo "go-version=${{env.GO_VERSION}}" >> "$GITHUB_OUTPUT" - lint: - needs: [setup] uses: ./.github/workflows/lint.yml - with: - go-version: ${{ needs.setup.outputs.go-version }} test: - needs: [setup] uses: ./.github/workflows/test.yml - with: - go-version: ${{ needs.setup.outputs.go-version }} proto: uses: ./.github/workflows/proto.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f2b279f..a3cf797 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,11 +3,6 @@ name: lint on: workflow_call: - inputs: - go-version: - description: 'Go version to use' - type: string - required: true jobs: golangci-lint: @@ -17,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} + go-version-file: go.mod # This steps sets the GIT_DIFF environment variable to true # if files defined in PATTERS changed - uses: technote-space/get-diff-action@v6.1.2 @@ -55,6 +50,6 @@ jobs: - name: set up go uses: actions/setup-go@v5 with: - go-version-file: 'go.mod' + go-version-file: go.mod - run: make proto-gen - run: make proto-lint diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index d55e37f..08b1767 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -12,7 +12,7 @@ jobs: - name: set up go uses: actions/setup-go@v5 with: - go-version-file: 'go.mod' + go-version-file: go.mod - name: "Check protobuf generated code matches committed code" # yamllint disable run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f84a16..fb56fb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,11 +3,6 @@ name: Tests / Code Coverage on: workflow_call: - inputs: - go-version: - description: "Go version to use" - type: string - required: true jobs: go_mod_tidy_check: @@ -17,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} + go-version-file: go.mod - run: go mod tidy - name: check for diff run: git diff --exit-code @@ -30,7 +25,7 @@ jobs: - name: set up go uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} + go-version-file: go.mod - name: Run unit test run: make test - name: upload coverage report @@ -47,6 +42,6 @@ jobs: - name: set up go uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go-version }} + go-version-file: go.mod - name: Integration Tests run: echo "No integration tests yet"