From 33895974a76134119a7f9484867f7aaff699d8cb Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Fri, 3 Jan 2025 23:59:38 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9C=20fix(ci):=20Fix=20scheduled=20run?= =?UTF-8?q?ners=20not=20working=20(#149)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/relay.yml | 4 +-- .github/workflows/runner.yml | 7 +++-- .github/workflows/sst.yml | 60 ------------------------------------ 3 files changed, 6 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/sst.yml diff --git a/.github/workflows/relay.yml b/.github/workflows/relay.yml index 74b4fc22..692ced3f 100644 --- a/.github/workflows/relay.yml +++ b/.github/workflows/relay.yml @@ -7,8 +7,6 @@ on: - "containers/relay.Containerfile" - "packages/relay/**" - ".github/workflows/relay.yml" - schedule: - - cron: 0 0 * * * # At the end of everyday push: branches: [main] paths: @@ -49,7 +47,7 @@ jobs: build-docker-main: name: Build image on main - if: ${{ github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index 80eae831..0e2b2d01 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -9,7 +9,7 @@ on: - "packages/server/**" - ".github/workflows/runner.yml" schedule: - - cron: 0 0 * * * # At the end of everyday + - cron: 7 0 * * 1,3,6 # Regularly to keep that build cache warm push: branches: [main] paths: @@ -35,6 +35,9 @@ jobs: build-docker-pr: name: Build image on PR runs-on: ubuntu-latest + permissions: + contents: read + packages: write if: ${{ github.event_name == 'pull_request' }} steps: - @@ -70,7 +73,7 @@ jobs: build-docker-main: name: Build image on main - if: ${{ github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/sst.yml b/.github/workflows/sst.yml deleted file mode 100644 index b8b90161..00000000 --- a/.github/workflows/sst.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: sst - -on: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }} - - -jobs: - deploy: - runs-on: ubuntu-latest - permissions: - id-token: write - contents: read - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/cache@v2 - with: - path: | - .sst - key: ${{ runner.os }}-sst - - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - uses: actions/setup-node@v1 - with: - node-version: "20" - - - run: "curl -fsSL https://ion.sst.dev/install | bash" - - - if: github.ref == 'refs/heads/dev' - name: Configure Dev AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: arn:aws:iam::058264103289:role/terminal-shop-dev-github - aws-region: us-east-2 - - - if: github.ref == 'refs/heads/production' - name: Configure Production AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: arn:aws:iam::211125775473:role/terminal-shop-production-github - aws-region: us-east-2 - - - name: deps - run: bun install - - - name: Deploy - env: - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - run: | - sst install - sst deploy --stage=${GITHUB_REF_NAME} \ No newline at end of file