From 31253de4f29f6bafc9b2a64f6464cff170c3d2cd Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 30 Jun 2023 11:41:33 -0400 Subject: [PATCH] update organization level ci-cd --- .github/workflows/TagBot.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/julia_ci.yml | 20 +++++++++++--------- 2 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/TagBot.yml diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..3cf9b49 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,30 @@ +name: TagBot +on: + issue_comment: + types: + - created + workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read +jobs: + TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.RELEASE_TOKEN }} diff --git a/.github/workflows/julia_ci.yml b/.github/workflows/julia_ci.yml index 5a8f5b9..9dabe35 100644 --- a/.github/workflows/julia_ci.yml +++ b/.github/workflows/julia_ci.yml @@ -1,8 +1,6 @@ name: Julia CI/CD on: - issue_comment: - types: ["created"] schedule: - cron: 0 0 * * * push: @@ -11,9 +9,17 @@ on: pull_request: workflow_dispatch: inputs: + action: + description: "Action" + required: true + default: "test" + type: choice + options: + - test + - release version: description: "Tag and release version:" - required: true + required: false permissions: actions: read @@ -31,7 +37,7 @@ permissions: jobs: CI: - if: github.event_name == 'pull_request' || github.event_name == 'push' + if: github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.action == 'test') uses: AlgebraicJulia/.github/.github/workflows/julia_ci.yml@main secrets: inherit CompatHelper: @@ -39,10 +45,6 @@ jobs: uses: AlgebraicJulia/.github/.github/workflows/julia_compat.yml@main secrets: inherit Release: - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' && inputs.action == 'release' && inputs.version != '' uses: AlgebraicJulia/.github/.github/workflows/julia_release.yml@main secrets: inherit - TagBot: - if: github.event_name == 'issue_comment' - uses: AlgebraicJulia/.github/.github/workflows/julia_tag.yml@main - secrets: inherit