mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-10 04:35:03 -05:00
chore(build): get last completed run to check whether to rebuild docker
This commit is contained in:
27
.github/workflows/continuous-integration.yaml
vendored
27
.github/workflows/continuous-integration.yaml
vendored
@@ -45,12 +45,33 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get changed files
|
||||
if: ${{ (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) || github.event_name == 'pull_request' }}
|
||||
uses: Ana06/get-changed-files@ea75ed777daf24d6e95f43957bd26b1eab20806c
|
||||
id: files
|
||||
with:
|
||||
format: 'space-delimited'
|
||||
env:
|
||||
IS_PR: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
CURRENT_SHA="${{ github.sha }}"
|
||||
if [[ "${IS_PR}" == "true" ]]; then
|
||||
BEFORE_SHA="${{ github.event.pull_request.base.sha }}"
|
||||
else
|
||||
BEFORE_SHA="$(./script/actions_utils/get_latest_run.sh \
|
||||
--token ${{ secrets.BOT_TOKEN }} \
|
||||
--org-repo ${{ github.repository }} \
|
||||
--event-types 'push workflow_dispatch repository_dispatch')"
|
||||
fi
|
||||
ALL_CHANGED_FILES=$(git diff --name-only "${CURRENT_SHA}" "${BEFORE_SHA}")
|
||||
|
||||
echo "Before sha1 ${BEFORE_SHA}"
|
||||
echo "Current sha1 ${CURRENT_SHA}"
|
||||
|
||||
echo "Changed files:"
|
||||
echo "${ALL_CHANGED_FILES}"
|
||||
|
||||
echo "::set-output name=all::${ALL_CHANGED_FILES//$'\n'/ }"
|
||||
|
||||
- name: Should rebuild docker check
|
||||
run: |
|
||||
set +e
|
||||
|
||||
Reference in New Issue
Block a user