diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index b60de7e..f67c503 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -120,8 +120,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@master + - uses: actions/checkout@v2 + with: + persist-credentials: false + # Otherwise, you will failed to push refs to dest repo. + fetch-depth: 0 + ref: refs/heads/${{ github.head_ref }} - name: Build linpeas run: | @@ -139,13 +143,14 @@ jobs: run: | git config --local user.email "" git config --global user.name "CI-linpeas-ubuntu" + git pull origin "${{ github.ref }}" --autostash --rebase -Xours git commit -m "linpeas.sh auto update" -a --allow-empty - name: Push changes uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} + branch: refs/heads/${{ github.head_ref }} + github_token: ${{ secrets.GITHUB_TOKEN }} Build_and_test_macpeas_master: runs-on: macos-latest