diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 226c146..b57d392 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -5,10 +5,8 @@ env: on: workflow_dispatch: - pull_request_target: + pull_request: branches: [ main, release** ] - types: - - closed jobs: echo-var: @@ -22,7 +20,7 @@ jobs: bump-version: runs-on: ubuntu-latest - if: github.event.action == 'closed' && github.event.pull_request.merged == true + if: contains(github.base_ref, 'main') && github.event_name == 'pull_request' steps: - shell: bash run: | @@ -31,13 +29,16 @@ jobs: mkdir -p ${{ github.workspace }} - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: bump assembly patch version if: github.ref == 'refs/heads/main' run: echo "ouch" - name: commit files run: | - date > generated.txt + date > README.md git config user.email github-actions@github.com git config user.name "github-actions" #git remote set-url origin https://x-access-token:${{secrets.github_token}}@github.maybank.com/${{github.repository}} diff --git a/README.md b/README.md index cebba5a..a56eb52 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ -# github-pages-test - -update readme \ No newline at end of file +Mon Dec 12 02:06:11 UTC 2022