From 7ee44169289b20a009b693a003da7ebe7e5a5ca3 Mon Sep 17 00:00:00 2001 From: Neha Viswanathan Date: Mon, 19 Oct 2020 00:14:21 -0700 Subject: [PATCH 1/9] update Github Actions --- .github/workflows/tag.yml | 51 ++++++++++++++++++++++++++++++++------- go.sum | 2 +- golangci-lint.iml | 10 ++++++++ 3 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 golangci-lint.iml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index d30f777140c0..c0dd84111a19 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -15,16 +15,16 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.15 - - name: Unshallow - run: git fetch --prune --unshallow + # - name: Unshallow + # run: git fetch --prune --unshallow - - name: Create release - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} + # - name: Create release + # uses: goreleaser/goreleaser-action@v2 + # with: + # version: latest + # args: release --rm-dist + # env: + # GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} docker-release: needs: [ release ] @@ -90,3 +90,36 @@ jobs: golangci/golangci-lint:${{ steps.prepare.outputs.full_tag_name }} golangci/golangci-lint:${{ steps.prepare.outputs.full_major_tag }} golangci/golangci-lint:${{ steps.prepare.outputs.latest_tag }} + + update_github_action: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + + - name: Update GitHub action config + run: make assets/github-action-config.json + + - name: Update netlify state hash + run: make update_netlify_state + + # - name: Update Contributors list + # run: make update_contributors_list # may take 15 min + + check-in-files: + runs-on: ubuntu-latest + needs: [ update_github_action ] + steps: + - uses: actions/checkout@v2 + - name: Create Pull Request + if: success() + uses: peter-evans/create-pull-request@v3 + with: + base: master + token: ${{ secrets.PAT_TOKEN }} + push-to-fork: golangci/golangci-lint diff --git a/go.sum b/go.sum index 0bf2a164e277..302acab22bdf 100644 --- a/go.sum +++ b/go.sum @@ -620,4 +620,4 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= \ No newline at end of file diff --git a/golangci-lint.iml b/golangci-lint.iml new file mode 100644 index 000000000000..49df094a939b --- /dev/null +++ b/golangci-lint.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file From 3459a18d49ffa894a992713804d32cffb3d142e9 Mon Sep 17 00:00:00 2001 From: Neha Viswanathan Date: Wed, 18 Nov 2020 21:03:34 -0800 Subject: [PATCH 2/9] dnm --- .github/workflows/tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c0dd84111a19..a4773b38125d 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -122,4 +122,4 @@ jobs: with: base: master token: ${{ secrets.PAT_TOKEN }} - push-to-fork: golangci/golangci-lint + push-to-fork: neha-viswanathan/golangci-lint From 1f42c89cd684d573a956a184022b924b26706d99 Mon Sep 17 00:00:00 2001 From: Neha Viswanathan Date: Wed, 18 Nov 2020 21:10:52 -0800 Subject: [PATCH 3/9] dnm 2 --- .github/workflows/tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index a4773b38125d..7c549700b3f0 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -122,4 +122,4 @@ jobs: with: base: master token: ${{ secrets.PAT_TOKEN }} - push-to-fork: neha-viswanathan/golangci-lint + push-to-fork: codectl/golangci-lint From 1c1712ce224eacf07d0c297f65336c3088502395 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Mon, 1 Mar 2021 10:12:12 -0600 Subject: [PATCH 4/9] update --- .github/workflows/tag.yml | 103 ++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 7c549700b3f0..11a111b7a185 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -15,19 +15,19 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.15 - # - name: Unshallow - # run: git fetch --prune --unshallow + - name: Unshallow + run: git fetch --prune --unshallow - # - name: Create release - # uses: goreleaser/goreleaser-action@v2 - # with: - # version: latest - # args: release --rm-dist - # env: - # GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} + - name: Create release + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} docker-release: - needs: [ release ] + needs: release runs-on: ubuntu-latest strategy: matrix: @@ -48,23 +48,23 @@ jobs: - name: Prepare id: prepare run: | - TAG=${GITHUB_REF#refs/tags/} - MAJOR=${TAG%.*} - SHORT_COMMIT=${GITHUB_SHA::8} - DATE=$(date '+%Y-%m-%dT%H:%M:%SZ') - echo ::set-output name=tag_name::${TAG} - echo ::set-output name=major_tag::${MAJOR} - echo ::set-output name=short_commit::${SHORT_COMMIT} - echo ::set-output name=date::${DATE} - if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then - echo ::set-output name=full_tag_name::${TAG}-alpine - echo ::set-output name=full_major_tag::${MAJOR}-alpine - echo ::set-output name=latest_tag::latest-alpine - else - echo ::set-output name=full_tag_name::${TAG} - echo ::set-output name=full_major_tag::${MAJOR} - echo ::set-output name=latest_tag::latest - fi + TAG=${GITHUB_REF#refs/tags/} + MAJOR=${TAG%.*} + SHORT_COMMIT=${GITHUB_SHA::8} + DATE=$(date '+%Y-%m-%dT%H:%M:%SZ') + echo ::set-output name=tag_name::${TAG} + echo ::set-output name=major_tag::${MAJOR} + echo ::set-output name=short_commit::${SHORT_COMMIT} + echo ::set-output name=date::${DATE} + if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then + echo ::set-output name=full_tag_name::${TAG}-alpine + echo ::set-output name=full_major_tag::${MAJOR}-alpine + echo ::set-output name=latest_tag::latest-alpine + else + echo ::set-output name=full_tag_name::${TAG} + echo ::set-output name=full_major_tag::${MAJOR} + echo ::set-output name=latest_tag::latest + fi - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -91,35 +91,32 @@ jobs: golangci/golangci-lint:${{ steps.prepare.outputs.full_major_tag }} golangci/golangci-lint:${{ steps.prepare.outputs.latest_tag }} - update_github_action: + update-docs-and-assets: + needs: docker-release runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.15 + - uses: actions/checkout@v2 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - uses: actions/setup-node@v2 - - name: Update GitHub action config - run: make assets/github-action-config.json + - name: Update GitHub action config + run: make assets/github-action-config.json - - name: Update netlify state hash - run: make update_netlify_state + - name: Update Contributors list + run: make update_contributors_list # may take 15 min - # - name: Update Contributors list - # run: make update_contributors_list # may take 15 min + - name: Update netlify state hash + run: make update_netlify_state - check-in-files: - runs-on: ubuntu-latest - needs: [ update_github_action ] - steps: - - uses: actions/checkout@v2 - - name: Create Pull Request - if: success() - uses: peter-evans/create-pull-request@v3 - with: - base: master - token: ${{ secrets.PAT_TOKEN }} - push-to-fork: codectl/golangci-lint + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + base: master + token: ${{ secrets.GOLANGCI_LINT_TOKEN }} + branch-suffix: timestamp + title: "Update documentation and assets" + team-reviewers: golangci/team + delete-branch: true From 0845e1f0c42ced325e41a16f203a18181ff81a23 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Mon, 1 Mar 2021 10:15:02 -0600 Subject: [PATCH 5/9] fix update-docs-and-assets action 1 --- .github/workflows/tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9ad635239af1..030cc1e378cb 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -99,8 +99,8 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: 1.15 - - uses: actions/setup-node@v2 + go-version: 1.16 + - uses: actions/setup-node@v2 - name: Update GitHub action config run: make assets/github-action-config.json From d6ea06781f859be9d1e32ef759bfe5925439e5a1 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Mon, 1 Mar 2021 10:36:45 -0600 Subject: [PATCH 6/9] add github token env --- .github/workflows/tag.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 030cc1e378cb..2f96b56ae7a0 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -94,6 +94,8 @@ jobs: update-docs-and-assets: needs: docker-release runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} steps: - uses: actions/checkout@v2 - name: Install Go From 81f1db26c08947e74bc6a39de7d1d11cef0f5ae5 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Mon, 1 Mar 2021 10:48:52 -0600 Subject: [PATCH 7/9] npm install --- .github/workflows/tag.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 2f96b56ae7a0..20bd6c96f5f1 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -102,11 +102,17 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.16 - - uses: actions/setup-node@v2 - name: Update GitHub action config run: make assets/github-action-config.json + - uses: actions/setup-node@v2 + with: + node-version: "15" + check-latest: true + - name: npm install + working-directory: .github/contributors + run: npm install - name: Update Contributors list run: make update_contributors_list # may take 15 min From 764ed366bec636372c64eaa2bf8ef95b593dafc9 Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm Date: Mon, 1 Mar 2021 11:02:32 -0600 Subject: [PATCH 8/9] remove golangci-lint.iml --- golangci-lint.iml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 golangci-lint.iml diff --git a/golangci-lint.iml b/golangci-lint.iml deleted file mode 100644 index 49df094a939b..000000000000 --- a/golangci-lint.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file From c9ed065001d181e4cb45d0dfec90471dc0a8e4c8 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 3 Mar 2021 13:33:16 +0100 Subject: [PATCH 9/9] feat: trigger when the release in published. --- .github/workflows/post-release.yml | 43 ++++++++++++++++++++++++++++++ .github/workflows/tag.yml | 38 -------------------------- 2 files changed, 43 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/post-release.yml diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml new file mode 100644 index 000000000000..8c72d95c233a --- /dev/null +++ b/.github/workflows/post-release.yml @@ -0,0 +1,43 @@ +name: "Publish release documentation" +on: + release: + types: + - published + +jobs: + update-docs-and-assets: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} + steps: + - uses: actions/checkout@v2 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Update GitHub action config + run: make assets/github-action-config.json + + - uses: actions/setup-node@v2 + with: + node-version: "15" + check-latest: true + - name: npm install + working-directory: .github/contributors + run: npm install + - name: Update Contributors list + run: make update_contributors_list # may take 15 min + + - name: Update netlify state hash + run: make update_netlify_state + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + base: master + token: ${{ secrets.GOLANGCI_LINT_TOKEN }} + branch-suffix: timestamp + title: "Update documentation and assets" + team-reviewers: golangci/team + delete-branch: true diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 20bd6c96f5f1..08a6db4126a3 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -90,41 +90,3 @@ jobs: golangci/golangci-lint:${{ steps.prepare.outputs.full_tag_name }} golangci/golangci-lint:${{ steps.prepare.outputs.full_major_tag }} golangci/golangci-lint:${{ steps.prepare.outputs.latest_tag }} - - update-docs-and-assets: - needs: docker-release - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} - steps: - - uses: actions/checkout@v2 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Update GitHub action config - run: make assets/github-action-config.json - - - uses: actions/setup-node@v2 - with: - node-version: "15" - check-latest: true - - name: npm install - working-directory: .github/contributors - run: npm install - - name: Update Contributors list - run: make update_contributors_list # may take 15 min - - - name: Update netlify state hash - run: make update_netlify_state - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - base: master - token: ${{ secrets.GOLANGCI_LINT_TOKEN }} - branch-suffix: timestamp - title: "Update documentation and assets" - team-reviewers: golangci/team - delete-branch: true