From 95022e8e8b39896c8006c915ad1e0912c61333ac Mon Sep 17 00:00:00 2001 From: Artem Nikitin Date: Wed, 29 Sep 2021 19:38:34 +0200 Subject: [PATCH] Auto-generate NOTICE (#524) * Update go.yml * Update NOTICE * Update NOTICE * Test NOTICE * Update NOTICE * Run on master only * Test NOTICE * Update NOTICE * Move to job running after merge * Test NOTICE * Rename Github Actiosn job * Specify main branch explicitly Co-authored-by: elasticcloudclients --- .github/workflows/on_master_generation.yml | 31 ++++++++++++++++++++++ NOTICE | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/on_master_generation.yml diff --git a/.github/workflows/on_master_generation.yml b/.github/workflows/on_master_generation.yml new file mode 100644 index 00000000..609b95f8 --- /dev/null +++ b/.github/workflows/on_master_generation.yml @@ -0,0 +1,31 @@ +name: Generate on commit to master +on: + push: + branches: + - master + workflow_dispatch: +jobs: + GenerateOnMaster: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + id: go + + - run: make format + - name: Commit & Push changes + run: | + if [[ ! -z $(git status --porcelain) ]]; then + git config --local user.email elasticcloudclients@elastic.co + git config --local user.name elasticcloudclients + git add NOTICE + git commit -m "Update NOTICE" + git push + fi diff --git a/NOTICE b/NOTICE index 2f538dc7..68f06184 100755 --- a/NOTICE +++ b/NOTICE @@ -17,4 +17,6 @@ github.com/asaskevich/govalidator MIT github.com/spf13/viper MIT github.com/stretchr/testify MIT + + =========================================================================