From d15efb49eaf683afa90680f8ef0dd8a6775365f1 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Thu, 13 Feb 2025 14:47:45 -0500 Subject: [PATCH] ci(.github/): update ci configs to match go-fastly and cli --- .github/PULL_REQUEST_TEMPLATE.md | 24 +++++++++++ .../workflows/dependabot_changelog_update.yml | 23 +++++++++++ .github/workflows/pr.yml | 41 +++---------------- 3 files changed, 53 insertions(+), 35 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/dependabot_changelog_update.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..08e549bb8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + All Submissions: + +* [ ] Have you followed the guidelines in our Contributing document? +* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/fastly/go-fastly/pulls) for the same update/change? + + + +### New Feature Submissions: + +* [ ] Does your submission pass tests? + +### Changes to Core Features: + +* [ ] Have you added an explanation of what your changes do and why you'd like us to include them? +* [ ] Have you written new tests for your core changes, as applicable? +* [ ] Have you successfully run tests with your changes locally? + +### User Impact + +* [ ] What is the user impact of this change? + +### Are there any considerations that need to be addressed for release? + + \ No newline at end of file diff --git a/.github/workflows/dependabot_changelog_update.yml b/.github/workflows/dependabot_changelog_update.yml new file mode 100644 index 000000000..ecce3d4fe --- /dev/null +++ b/.github/workflows/dependabot_changelog_update.yml @@ -0,0 +1,23 @@ +name: 'pull-request' +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + - labeled + - unlabeled +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dangoslen/dependabot-changelog-helper@v3 + with: + activationLabels: dependencies + changelogPath: './CHANGELOG.md' + entryPrefix: 'build(deps): ' + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "docs(CHANGELOG.md): add dependency bump from dependabot" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a3f4287b3..83b8f7d95 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,13 +13,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22.x - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - name: Fmt run: make fmt - name: Vet @@ -39,15 +32,14 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - name: Test run: make test + + changelog: + runs-on: ubuntu-latest + steps: + - uses: dangoslen/changelog-enforcer@v3 + docs: runs-on: ubuntu-latest steps: @@ -79,13 +71,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22.x - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - name: Install Terraform CLI uses: hashicorp/setup-terraform@v3 - name: Validate Interface @@ -129,13 +114,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22.x - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - name: Install Terraform CLI uses: hashicorp/setup-terraform@v3 - name: Validate Interface @@ -188,13 +166,6 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22.x - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: