From 16fc94862f1bdb2e39b5d8eca71949591568db99 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Sat, 11 Feb 2023 00:45:31 +0900 Subject: [PATCH] ci/hotfix: legacy workflow (#16720) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/README.md | 10 +++++----- ...heckpoints.yml => _legacy-checkpoints.yml} | 1 - .github/workflows/ci-checkpoints.yml | 20 +++++++++++++++++++ .github/workflows/release-pypi.yml | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) rename .github/workflows/{legacy-checkpoints.yml => _legacy-checkpoints.yml} (99%) create mode 100644 .github/workflows/ci-checkpoints.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 3a24a13308978..c2924516003a6 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -46,11 +46,11 @@ ## Deployment -| workflow file | action | -| ---------------------------------------- | ---------------------------------------------------------------------------------- | -| .github/workflows/release-pypi.yml | Publish a release to PyPI. | -| .github/workflows/release-docker.yml | Build Docker images from dockers/\*/Dockerfile and publish them on hub.docker.com. | -| .github/workflows/legacy-checkpoints.yml | App on request generate legacy checkpoints and upload them to AWS S3. | +| workflow file | action | +| ------------------------------------------ | ---------------------------------------------------------------------------------- | +| .github/workflows/release-pypi.yml | Publish a release to PyPI. | +| .github/workflows/release-docker.yml | Build Docker images from dockers/\*/Dockerfile and publish them on hub.docker.com. | +| .github/workflows/\_legacy-checkpoints.yml | App on request generate legacy checkpoints and upload them to AWS S3. | ## Bots diff --git a/.github/workflows/legacy-checkpoints.yml b/.github/workflows/_legacy-checkpoints.yml similarity index 99% rename from .github/workflows/legacy-checkpoints.yml rename to .github/workflows/_legacy-checkpoints.yml index aa543a5729ca1..82fd861097932 100644 --- a/.github/workflows/legacy-checkpoints.yml +++ b/.github/workflows/_legacy-checkpoints.yml @@ -35,7 +35,6 @@ on: default: false required: false type: boolean - secrets: inherit defaults: run: diff --git a/.github/workflows/ci-checkpoints.yml b/.github/workflows/ci-checkpoints.yml new file mode 100644 index 0000000000000..71a4fe007c3a0 --- /dev/null +++ b/.github/workflows/ci-checkpoints.yml @@ -0,0 +1,20 @@ +name: Validate legacy ckpts + +on: + push: + branches: [master, "release/*"] + pull_request: + branches: [master, "release/*"] + types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped + paths: + - ".github/workflows/ci-checkpoints.yml" + - ".github/workflows/_legacy-checkpoints.yml.yml" + +jobs: + + try-legacy-checkpoints: + uses: ./.github/workflows/_legacy-checkpoints.yml + with: + push_to_s3: false + create_pr: false + secrets: inherit diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 89f04d6537c7f..8634149784f6d 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -169,7 +169,7 @@ jobs: legacy-checkpoints: needs: [build-packages] - uses: ./.github/workflows/legacy-checkpoints.yml + uses: ./.github/workflows/_legacy-checkpoints.yml with: push_to_s3: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' }} create_pr: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' }}