diff --git a/.github/workflows/gitlab-codebuild.yml b/.github/workflows/gitlab-codebuild.yml index 728af6061a..04a0cdde71 100644 --- a/.github/workflows/gitlab-codebuild.yml +++ b/.github/workflows/gitlab-codebuild.yml @@ -8,6 +8,9 @@ on: pull_request_target: branches: - '**' + push: + branches: + - '**' jobs: build: @@ -16,15 +19,18 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run script + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + EVENT_TYPE: ${{ github.event_name }} run: | git config --global user.name "Github_CI" git config --global user.email "project_14468_bot_3f7d8e1a392afd88ead5f3f3154e809d@noreply.gitlab.com" git clone https://isis-codebuild-ci:$GITLAB_TOKEN@code.usgs.gov/astrogeology/isis-codebuild-ci.git cd isis-codebuild-ci - git checkout -b PR_$PR_NUMBER + git checkout -b $PR_NUMBER echo -e "\nenv: \n shell: bash \n variables: \n PR_NUMBER: $PR_NUMBER \n MERGE_BRANCH: $GITHUB_BASE_REF" >> buildspec.yml git commit -a -m "$PR_NUMBER" - git push origin PR_$PR_NUMBER --force + git push origin $PR_NUMBER --force comment-bot: permissions: write-all @@ -42,4 +48,4 @@ jobs: To view your [build log](https://us-west-2.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoiNDJNZ2MxbHFKTkwxV1RyQUxJekdJY3FIanNqU29rMHB4Nk1YUzk4REIrZUZDeEtEaW9HQlZ1dTZOSHpML2VUTGVDekYydmVFcU9sUHJKN20wQzd1Q0UzSzJscnB0MElDb1M3Ti9GTlJYR1RuMWJTV3V1SkJTa3NoYmc9PSIsIml2UGFyYW1ldGVyU3BlYyI6IjF3U2NTSGlDcEtCc29YVnEiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D), please reference the build with source version: "PR_${{ github.event.number }}". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. - \ No newline at end of file +