From 40ed4fbc6f3f8fffaf60d9584b30750e12f46d69 Mon Sep 17 00:00:00 2001 From: SotaTek-DuyLe <75770191+SotaTek-DuyLe@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:36:38 +0700 Subject: [PATCH] feat: Add nightly setup (#274) * feat: add nightly setup * fix: check outputs nightly * fix: nightly required * fix: fix workflow nightly * fix: add nightly target * ci: fix search nightly targets * fix: unknown word * refactor code * refactor: clean code --------- Co-authored-by: SotaTek-DuyLe Co-authored-by: SotaTek-DuyLe --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .github/workflows/pages.yml | 2 +- .github/workflows/run.yml | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5279bbd1..ab72187ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ on: workflow_call: inputs: + nightly: + description: When set to true, the workflow will run with the nightly setup + required: false + type: boolean + default: false aws_ecr_registry: description: | The AWS ECR registry that will be used to publish images @@ -162,6 +167,20 @@ jobs: secrets: earthly_runner_address: ${{ secrets.earthly_runner_address }} earthly_runner_secret: ${{ secrets.earthly_runner_secret }} + nightly: + uses: ./.github/workflows/run.yml + if: inputs.nightly == true + needs: [build, check, package, test] + with: + aws_role_arn: ${{ inputs.aws_role_arn }} + aws_region: ${{ inputs.aws_region }} + ci_cli_version: ${{ inputs.ci_cli_version }} + earthly_version: ${{ inputs.earthly_version }} + target: nightly nightly-* + privileged: true + secrets: + earthly_runner_address: ${{ secrets.earthly_runner_address }} + earthly_runner_secret: ${{ secrets.earthly_runner_secret }} release: uses: ./.github/workflows/release.yml needs: [build, check, package, test] diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b3262d837..ece9ff3f8 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -102,4 +102,4 @@ jobs: single-commit: true target-folder: ${{ env.DEST_DIR }} branch: ${{ inputs.publish_branch }} - folder: ${{ steps.build.outputs.artifact }} + folder: ${{ steps.build.outputs.artifact }} \ No newline at end of file diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 87145447e..cd4ddcb50 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -129,4 +129,4 @@ jobs: privileged: ${{ inputs.privileged }} earthfile: ${{ matrix.earthfile }} runner_address: ${{ secrets.earthly_runner_address }} - targets: ${{ steps.get_target.outputs.targets }} + targets: ${{ steps.get_target.outputs.targets }} \ No newline at end of file