added chlog-update #11
This file contains 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
name: Update changelog | |
on: | |
push: | |
branches: | |
- CWQS-* | |
- main | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# updated CHANGELOG back to the repository. | |
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/ | |
contents: write | |
steps: | |
- uses: actions/checkout@v1 | |
- name: run a make update | |
run: make chlog-update-aws | |
- name: Commit updated CHANGELOG | |
run: make chlog-preview-aws | |
- name: switching from HTTPS to SSH | |
run: git remote set-url origin https://github.com/bhanuba/amazon-cloudwatch-agent-test.git | |
- name: check for changes | |
run: | | |
git status | |
- name: stage changed files | |
run: git add . | |
- name: commit changed files | |
run: | | |
git config --global user.name 'Github Action' | |
git config --global user.email '[email protected]' | |
git commit -m "Auto updating changelog-aws.md" | |
- name: fetch repo | |
run: git fetch origin main | |
- name: push code to main | |
run: | | |
git push origin HEAD:main |