Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: bump actions/checkout to v4 #1936

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/accept-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
accept-pull-request:
if: ${{ github.event.issue.pull_request && (github.event.comment.body == '/accept' || github.event.comment.body == '/accept --force') }}
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Init all internal env vars
id: init-all-internal-env-vars
env:
env:
TITLE: ${{ github.event.issue.title }}
run: |
pr_detail_file="pr_detail.json"
Expand All @@ -53,7 +53,7 @@ jobs:
HEAD_TYPE=origin
else
HEAD_TYPE=fork
fi
fi
echo "HEAD_REPO_FULL_NAME=${HEAD_REPO_FULL_NAME}" | tee -a "${GITHUB_ENV}"
echo "BASE_REPO_FULL_NAME=${BASE_REPO_FULL_NAME}" | tee -a "${GITHUB_ENV}"
echo "HEAD_TYPE=${HEAD_TYPE}" | tee -a "${GITHUB_ENV}"
Expand All @@ -62,12 +62,12 @@ jobs:
echo "PR_STATE=$(jq -rc .state ${pr_detail_file})" | tee -a "${GITHUB_ENV}"
echo "PR_DRAFT=$(jq -rc .draft ${pr_detail_file})" | tee -a "${GITHUB_ENV}"
echo "PR_MERGEABLE=$(jq -rc .mergeable ${pr_detail_file})" | tee -a "${GITHUB_ENV}"
echo "REMAINING_COMMITS_FILE=remaining_commits.txt" | tee -a "${GITHUB_ENV}"
echo "REMAINING_COMMITS_FILE=remaining_commits.txt" | tee -a "${GITHUB_ENV}"
echo "NEW_COMMITS_FILE=new_commits.txt" | tee -a "${GITHUB_ENV}"
echo "base_ref=$(jq -rc .base.ref ${pr_detail_file})" | tee -a "${GITHUB_OUTPUT}"

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}
token: ${{ secrets.HURL_BOT_TOKEN }}
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
comment="❌ Can not merge this pull request because it is still in draft."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
exit 1
fi

- name: Check if pull request is mergeable
Expand All @@ -130,7 +130,7 @@ jobs:
comment="❌ Pull request is not mergeable, please check unresolved discussions and pull request messages."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
exit 1
fi

- name: Check GitHub release
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
fi
fi

- name: Check if source branch is rebased from target branch
- name: Check if source branch is rebased from target branch
run: |
git log --oneline --cherry ${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }}...origin/${{ env.BASE_REF }} > "${{ env.REMAINING_COMMITS_FILE }}" && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 1 ] ; then
Expand All @@ -175,7 +175,7 @@ jobs:
if [ ${{ env.HEAD_TYPE }} == "fork" ] ; then
comment="❌ You have to rebase \`${{ env.HEAD_REPO_FULL_NAME}}/${{ env.HEAD_REF }}\` branch because there are new commits pending on target \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` branch (sorry i can't auto rebase from a fork):<br>$(echo ; sed "s/+/-/g" ${{ env.REMAINING_COMMITS_FILE }})"
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
fi
git fetch
Expand All @@ -186,8 +186,8 @@ jobs:
if [ ${exit_code} -eq 1 ] ; then
comment="❌ Auto rebase from \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` fails due to conflicts. Sorry but you have to manage this manually. Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
fi
git push --force && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 0 ] ; then
Expand All @@ -205,7 +205,7 @@ jobs:
else
comment="❌ Auto rebase from \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` fails on `git push --force`. Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
fi
git switch ${{ env.BASE_REF }}
fi
Expand All @@ -223,7 +223,7 @@ jobs:
exit 1
fi

- name: Check if source branch is rebased from target branch
- name: Check if source branch is rebased from target branch
run: |
git pull
git log --oneline --cherry ${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }}...origin/${{ env.BASE_REF }} > "${{ env.REMAINING_COMMITS_FILE }}" && exit_code=0 || exit_code=1
Expand All @@ -240,7 +240,7 @@ jobs:
if [ ${{ env.HEAD_TYPE }} == "fork" ] ; then
comment="❌ New commits have been pushed to \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` since you accept this PR. You have to rebase \`${{ env.HEAD_REPO_FULL_NAME}}/${{ env.HEAD_REF }}\` branch by yourself because i can't auto rebase from a fork.<br>Pending commits:<br>$(echo ; sed "s/+/-/g" ${{ env.REMAINING_COMMITS_FILE }})"
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
else
comment="❌ New commits have been pushed to \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` since you accept this PR. You can rebase it by yourself or simply re-accept this PR to execute an auto rebase.<br>Pending commits:<br>$(echo ; sed "s/+/-/g" ${{ env.REMAINING_COMMITS_FILE }})"
Expand All @@ -254,7 +254,7 @@ jobs:
run: |
git log --oneline --cherry origin/${{ env.BASE_REF }}...${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }} | tee ${{ env.NEW_COMMITS_FILE }}

- name: Merge fast forward head ref to base ref
- name: Merge fast forward head ref to base ref
run: |
git merge ${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }} --ff-only && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 0 ] ; then
Expand All @@ -263,7 +263,7 @@ jobs:
comment="❌ Merge fast forward fails. Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
exit 1
fi
git push && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 0 ] ; then
Expand All @@ -272,22 +272,22 @@ jobs:
comment="❌ Push merge fast forward fails. Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
echo " - ${comment}"
gh pr comment "${PR_NUMBER}" --body "${comment}"
exit 1
exit 1
fi

- name: Close pull request
run: |
if [[ "${PR_COMMENT}" =~ "--force" ]] ; then
comment="✅ Pull request merged without waiting for checks and closed by \`${COMMENT_USER_LOGIN}\` with fast forward merge."
comment="✅ Pull request merged without waiting for checks and closed by \`${COMMENT_USER_LOGIN}\` with fast forward merge."
else
comment="✅ Pull request merged and closed by \`${COMMENT_USER_LOGIN}\` with fast forward merge."
fi
gh pr close "${PR_NUMBER}" --delete-branch --comment "${comment}.<br><br>\# List of commits merged from \`${{ env.HEAD_REPO_FULL_NAME}}/${{ env.HEAD_REF }}\` branch into \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` branch:<br>$(echo ; sed "s/+/-/g" ${{ env.NEW_COMMITS_FILE }})" && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 0 ] ; then
echo " - ${comment}"
echo " - ${comment}"
else
comment="❌ A problem occurred when closing pull request and/or deleting branch."
echo " - ${comment}"
#gh pr comment "${PR_NUMBER}" --body "${comment} Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
#exit 1
#exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Check Rust version
if: always()
run: bin/check/rust_version.py 7

- name: Rustfmt
if: always()
run: bin/check/rustfmt.sh
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
rust: [stable]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Environment
run: bin/environment.sh
Expand All @@ -42,7 +42,7 @@ jobs:
export PATH="$PWD/target/debug:$PATH"
bin/test/test_integ.sh
- name: Build Report
run: |
run: |
grcov . --binary-path target/debug -s . -t html --branch --ignore-not-existing -o ./coverage/

- name: Init git bot context
Expand Down Expand Up @@ -73,4 +73,3 @@ jobs:
path: |
coverage
*.profraw

21 changes: 10 additions & 11 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Install Python 3.10
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Retrieve release-generic-linux-x64-artifacts
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Retrieve release-generic-linux-x64-artifacts
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Retrieve release-generic-linux-x64-artifacts
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# with:
# ref: ${{ inputs.branch }}
# - name: Set up Docker Buildx
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Set up Docker Buildx
Expand Down Expand Up @@ -365,7 +365,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Install Python 3.10
Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Install Prerequisites
Expand Down Expand Up @@ -456,7 +456,7 @@ jobs:
with:
name: release-macos-x64-artifacts
path: target/upload/*

package-windows-x64:
runs-on: windows-latest
env:
Expand All @@ -467,7 +467,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Manage vcpkg cache
Expand Down Expand Up @@ -509,4 +509,3 @@ jobs:
path: |
.\target\win-package\hurl-*-installer.exe
.\target\win-package\hurl-*-win64.zip

10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check release pull request existence
id: check-release-pull-request-existence
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
steps:
- name: Checkout repository
if: github.ref_name == 'master'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create release branch
if: github.ref_name == 'master'
Expand All @@ -185,7 +185,7 @@ jobs:
fi

- name: Checkout new release branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.set-context.outputs.release_branch }}

Expand All @@ -204,7 +204,7 @@ jobs:
echo " > package version for ${cargo_toml}"
echo " $(grep "^version =" "${cargo_toml}")"
for dep_package in ${hurl_packages} ; do
if [ $(grep -c "^${dep_package} =" "${cargo_toml}") -gt 0 ] ; then
if [ $(grep -c "^${dep_package} =" "${cargo_toml}") -gt 0 ] ; then
sed -i "s/^${dep_package} = { version .*/${dep_package} = { version = \"${{ needs.set-context.outputs.release_version }}\", path = \"..\/${dep_package}\" }/" "${cargo_toml}"
echo " > ${dep_package} dep package version for ${cargo_toml}"
echo " $(grep "^${dep_package} =" "${cargo_toml}")"
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout new release branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.set-context.outputs.release_branch }}

Expand Down
Loading
Loading