Skip to content

added chlog-update

added chlog-update #22

Workflow file for this run

name: Update changelog
env:
UPSTREAM: https://github.com/amazon-contributing/opentelemetry-collector-contrib.git
UPSTREAM_BRANCH: CWQS-761
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:
- name: Get latest commit sha
id: get-latest-commit
run: |
if ["${{ inputs.CommitSha }}" == ""]; then
echo "sha=$(git ls-remote ${{ env.UPSTREAM }} ${{ env.UPSTREAM_BRANCH }} | awk '{print $1;}')" >> $GITHUB_OUTPUT
else
echo "sha=${{ inputs.CommitSha }}" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ~1.21.1
cache: false
- name: make update changelog
run: make chlog-update-aws
- name: switching from HTTPS to SSH
run: git remote set-url origin UPSTREAM
- 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 from master
run: git fetch origin CWQS-761
- name: push code to master
run: git push origin CWQS-761