fix error caused by merge with develop #2730
This file contains hidden or 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: Mirroring | |
| on: [push, delete] | |
| jobs: | |
| to_gitlab: | |
| runs-on: ubuntu-18.04 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - uses: spyoungtech/mirror-action@master | |
| with: | |
| REMOTE: ${{ secrets.GIT_REPO_URL }} | |
| GIT_USERNAME: ${{ secrets.GIT_USER }} | |
| GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }} | |
| GIT_PUSH_ARGS: --push-option=ci.skip --tags --force --prune | |
| - uses: nelonoel/branch-name@v1.0.1 | |
| - name: Trigger Pipeline | |
| run: | | |
| response=$(curl -X POST -F token=${{ secrets.PNNL_PIPELINE_TRIGGER_TOKEN }} -F ref=${BRANCH_NAME} https://gitlab.pnnl.gov/api/v4/projects/769/trigger/pipeline) | |
| exit_code=$? | |
| sudo apt install jq | |
| pipeline_id=$(echo $response | jq '.id' | sed 's/"//g') | |
| echo "PIPELINE_ID=${pipeline_id}" >> $GITHUB_ENV | |
| exit $exit_code | |
| - name: Watch Pipeline Results | |
| run: | | |
| sudo apt install jq | |
| while :; do | |
| response=$(curl --header "PRIVATE-TOKEN: ${{ secrets.PNNL_GITLAB_CI_PAT }}" "https://gitlab.pnnl.gov/api/v4/projects/769/pipelines/${PIPELINE_ID}") | |
| status=$(echo $response | jq '.status' | sed -e 's/"//g') | |
| echo | |
| echo "Full response: ${response}" | |
| echo | |
| echo "-- Got pipeline status: $status" | |
| echo | |
| bash_code=$(echo $status | perl -ne 'if (/failed/){print"exit 1";exit;} elsif (/success/){print"exit 0";exit;}') | |
| eval "$bash_code" | |
| sleep 60 | |
| done | |