From a3881b221261ff027e64d07bb7eb31a65f50cead Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 12 Oct 2022 14:39:38 +0100 Subject: [PATCH 1/2] action: validate changelog fragment --- .github/workflows/changelog.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000000..aba1240a30c --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,17 @@ +name: Changelog +on: [pull_request] + +jobs: + fragments: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Fetch Go version from .go-version + run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + - name: check changelog + run: | + GOBIN=$PWD/bin go install github.com/elastic/elastic-agent-changelog-tool@latest + ./bin/elastic-agent-changelog-tool pr-has-fragment --repo ${{ github.event.repository.name }} ${{github.event.number}} From f7cbc5eac70cad49cfcb367e7ee3d33be309e0a4 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 13 Oct 2022 09:15:27 +0100 Subject: [PATCH 2/2] Update .github/workflows/changelog.yml --- .github/workflows/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index aba1240a30c..d0f29a0fd25 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - - name: check changelog + - name: check pr-has-fragment run: | GOBIN=$PWD/bin go install github.com/elastic/elastic-agent-changelog-tool@latest ./bin/elastic-agent-changelog-tool pr-has-fragment --repo ${{ github.event.repository.name }} ${{github.event.number}}