Skip to content

Commit

Permalink
fix acitons
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom committed Dec 17, 2024
1 parent 5ea84fa commit 3177446
Show file tree
Hide file tree
Showing 17 changed files with 66 additions and 119 deletions.
File renamed without changes.
13 changes: 13 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ runs:
using: 'composite'

steps:
- name: Restore Next.js Build Cache & Cypress cache
id: restore-nc
uses: ./.github/actions/cache-deps
with:
mode: restore-nc

- name: Set environment variables
shell: bash
run: |
Expand Down Expand Up @@ -61,3 +67,10 @@ runs:
NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING }}
NEXT_PUBLIC_SPINDL_SDK_KEY: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_SPINDL_SDK_KEY }}
NEXT_PUBLIC_ECOSYSTEM_ID_ADDRESS: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_ECOSYSTEM_ID_ADDRESS }}

- name: Save Next.js Build Cache & Cypress cache
if: steps.restore-nc.outputs.cache-hit-nc != 'true'
uses: ./.github/actions/cache-deps
with:
mode: save-nc
key: ${{ steps.restore-nc.outputs.computed-cache-key-nc }}
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ inputs:
runs:
using: 'composite'
steps:
- uses: ./.github/workflows/yarn
- uses: ./.github/actions/yarn

- name: Install Latest stable Chrome Version
shell: bash
run: |
curl -O 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
sudo apt-get install ./google-chrome-stable_current_amd64.deb
- uses: ./.github/workflows/build
- uses: ./.github/actions/build
with:
secrets: ${{ inputs.secrets }}
e2e_mnemonic: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_CYPRESS_MNEMONIC }}
Expand Down
36 changes: 36 additions & 0 deletions .github/actions/yarn/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Yarn'

description: 'Install the dependencies'

runs:
using: 'composite'
steps:
# We require yarn v4 and installing through corepack is the easiest way to get it
- uses: actions/checkout@v4

- uses: ./.github/actions/corepack

- name: Restore Yarn Cache & Types
id: restore-yarn-types
uses: ./.github/actions/cache-deps
with:
mode: restore-yarn

- name: Echo cache hit
shell: bash
run: |
echo "Yarn cache hit: ${{ steps.restore-yarn-types.outputs.cache-hit-yarn }}"
- name: Yarn install & after-install generate types
if: steps.restore-yarn-types.outputs.cache-hit-yarn != 'true'
shell: bash
run: |
yarn install --immutable
yarn after-install
- name: Save Yarn Cache & Types
if: steps.restore-yarn-types.outputs.cache-hit-yarn != 'true'
uses: ./.github/actions/cache-deps
with:
mode: save-yarn
key: ${{ steps.restore-yarn-types.outputs.computed-cache-key-yarn }}
62 changes: 0 additions & 62 deletions .github/workflows/build/action.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:

- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn
- uses: ./.github/actions/yarn

- uses: ./.github/workflows/build
- uses: ./.github/actions/build
with:
secrets: ${{ toJSON(secrets) }}
if: startsWith(github.ref, 'refs/heads/main')
# if: startsWith(github.ref, 'refs/heads/main')

#- uses: ./.github/workflows/build-storybook

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn
- uses: ./.github/actions/yarn

- uses: ./.github/workflows/build
- uses: ./.github/actions/build
with:
secrets: ${{ toJSON(secrets) }}
prod: ${{ true }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-full-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-hp-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-prod-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-safe-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: cypress/e2e/safe-apps/*.cy.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
- uses: ./.github/actions/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: cypress/e2e/smoke/*.cy.js
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn
- uses: ./.github/actions/yarn

- uses: CatChen/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nextjs-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/workflows/yarn
uses: ./.github/actions/yarn

- name: Build next.js app
uses: ./.github/workflows/build
uses: ./.github/actions/build
with:
secrets: ${{ toJSON(secrets) }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn
- uses: ./.github/actions/yarn

- name: Annotations and coverage report
uses: ArtiomTr/[email protected]
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/yarn/action.yml

This file was deleted.

0 comments on commit 3177446

Please sign in to comment.