Unverified Commit 94c39d70 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

Update gitlab-codebuild.yml

parent 7195f978
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
name: Github to Gitlab CI - Run CodeBuild

env:
  PR_NUMBER: ${{ github.event.number }}
  GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}

on:
@@ -19,15 +18,18 @@ jobs:
    steps:
      - uses: actions/checkout@v4
      - name: Run script
        env: 
          REF_NAME: ${{ github.ref }}
          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 $REF_NAME
          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 commit -a -m "$REF_NAME"
          git push origin $REF_NAME --force
          
  comment-bot:
      permissions: write-all