go updates #784
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
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - "main" | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| build-kots-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: "**/*.sum" | |
| - name: setup env | |
| run: | | |
| echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| shell: bash | |
| - run: make test build | |
| env: | |
| GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| needs: build-kots-lint | |
| if: startsWith(github.ref, 'refs/tags/v') != true # this only runs for non-tag commits | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: docker/setup-buildx-action@v2 | |
| - uses: docker/build-push-action@v4 | |
| with: | |
| push: false | |
| tags: replicated/kots-lint:ci-test | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| needs: build-kots-lint | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Unshallow | |
| run: git fetch --prune --unshallow | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: "**/*.sum" | |
| - run: sudo apt-get -qq -y install | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v4 | |
| with: | |
| version: "v0.166.1" | |
| args: release --rm-dist --config deploy/.goreleaser.yaml | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: build-kots-lint | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: docker/setup-buildx-action@v2 | |
| - uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - uses: docker/build-push-action@v4 | |
| with: | |
| push: true | |
| tags: replicated/kots-lint:${{ github.ref_name }} | |
| flyio: | |
| runs-on: ubuntu-latest | |
| needs: build-kots-lint | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: superfly/flyctl-actions@1.1 | |
| with: | |
| args: deploy --app kots-lint --config ./fly.toml --image-label ${GITHUB_REF:10} | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| flyio-dd-agent: | |
| runs-on: ubuntu-latest | |
| needs: flyio | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: superfly/flyctl-actions@1.1 | |
| with: | |
| args: deploy --config ./dd-fly.toml --app dd-agent -e DD_API_KEY=${{ secrets.DD_API_KEY }} -e DD_SITE="datadoghq.com" -e DD_APM_NON_LOCAL_TRAFFIC=true | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |