From c47a1aed470b1f95c593ffdcea72ff4677b06abb Mon Sep 17 00:00:00 2001 From: "Vipul Gupta (@vipulgupta2048)" Date: Mon, 5 Feb 2024 00:38:18 +0530 Subject: [PATCH] patch: Add Flowzone back Signed-off-by: Vipul Gupta (@vipulgupta2048) --- .github/workflows/deploy-to-balena.yml | 38 ----------------------- .github/workflows/flowzone.yml | 42 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/deploy-to-balena.yml create mode 100644 .github/workflows/flowzone.yml diff --git a/.github/workflows/deploy-to-balena.yml b/.github/workflows/deploy-to-balena.yml deleted file mode 100644 index 1aeff2a3..00000000 --- a/.github/workflows/deploy-to-balena.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "Deploy to Balena" - -on: - pull_request: - types: [opened, synchronize, closed] - branches: - - main - - master - paths-ignore: - - 'docs/**' - - README.md - - workflow_dispatch: - -env: - BALENA_APP: balenalabs/balenasound - -jobs: - build: - name: "Deploy-to-Balena" - runs-on: "ubuntu-latest" - steps: - - name: Checkout main branch - uses: actions/checkout@v3 - - - name: Update balena.yml - uses: balena-io-experimental/balena.yml-action@main - with: - # Synchronise the GitHub README with the Balena Hub README - sync_readme: true - # If pushing a tag to deploy, use the same tag as the version number to display on Balena Hub - sync_tag: false - - - name: Deploy to Balena - uses: balena-io/deploy-to-balena-action@master - with: - balena_token: ${{ secrets.BALENA_API_KEY }} - fleet: ${{ env.BALENA_APP }} diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml new file mode 100644 index 00000000..05378cc6 --- /dev/null +++ b/.github/workflows/flowzone.yml @@ -0,0 +1,42 @@ + +name: Flowzone + +on: + pull_request: + types: [opened, synchronize, closed] + branches: [main, master] + # allow external contributions to use secrets within trusted code + pull_request_target: + types: [opened, synchronize, closed] + branches: [main, master] + workflow_dispatch: + +jobs: + flowzone: + name: Flowzone + uses: product-os/flowzone/.github/workflows/flowzone.yml@master + # prevent duplicate workflow executions for pull_request and pull_request_target + if: | + ( + github.event.pull_request.head.repo.full_name == github.repository && + github.event_name == 'pull_request' + ) || ( + github.event.pull_request.head.repo.full_name != github.repository && + github.event_name == 'pull_request_target' + ) + + # Workflows in the same org or enterprise can use the inherit keyword to implicitly pass secrets + secrets: inherit + + with: + balena_slugs: balenalabs/balenasound + + update-balena-yml: + name: Update balena.yml + uses: balena-io-experimental/balena.yml-action@main + with: + # Synchronise the GitHub README with the Balena Hub README + sync_readme: true + # If pushing a tag to deploy, use the same tag as the version number to display on Balena Hub + sync_tag: false +