From 32ebd7cae3d30e76552c666cd7a8de86e3b5a1bc Mon Sep 17 00:00:00 2001 From: Andrew Dryga Date: Mon, 12 Jun 2023 14:00:47 -0600 Subject: [PATCH] Try a different CI setup --- .github/workflows/cd.yml | 17 +++++++++++------ .github/workflows/elixir.yml | 9 +++++---- .github/workflows/pre_commit.yml | 3 +-- .github/workflows/rust.yml | 14 +++++++------- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 358ab962c..86aee559e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,14 +1,9 @@ name: Continuous Delivery on: - workflow_run: - # Note: if you use multiple workflows here only one will be required - # to trigger the deployment. - workflows: ["Elixir"] + push: branches: - master - cloud - types: - - completed # Cancel old workflow runs if new code is pushed concurrency: @@ -16,11 +11,21 @@ concurrency: cancel-in-progress: false jobs: + elixir: + uses: ./.github/workflows/elixir.yml + rust: + uses: ./.github/workflows/rust.yml + terraform: + uses: ./.github/workflows/terraform.yml deploy: runs-on: ubuntu-latest # if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: write + needs: + - elixir + - rust + - terraform env: TF_CLOUD_ORGANIZATION: "firezone" TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}" diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 6294156ac..3ffd54b6f 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -4,10 +4,11 @@ on: paths: - "elixir/**" - ".github/workflows/elixir.yml" - push: - branches: - - master - - cloud + workflow_call: + inputs: + config-path: + required: true + type: string # Cancel old workflow runs if new code is pushed concurrency: diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 98d39bf92..ece757a57 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -1,8 +1,7 @@ name: Codespell on: pull_request: - # TODO: Enable this for PRs against `cloud` when chaos settles - # pull_request: + push: branches: - cloud diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3b1a8f0ad..eee6e07e1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,13 +1,13 @@ -name: Rust CI +name: Rust on: pull_request: paths: - - 'rust/**' - push: - branches: - - master - paths: - - 'rust/**' + - "rust/**" + workflow_call: + inputs: + config-path: + required: true + type: string # Cancel old workflow runs if new code is pushed concurrency: