Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Federation): update latest versions #59

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions .github/workflows/compass-federation-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,43 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Set environment variables
if: ${{ inputs.env_vars }}
run: |
for i in "${{ inputs.env_vars }}"
do
printf "%s\n" $i >> $GITHUB_ENV
done
- name: Set environment variables
if: ${{ inputs.env_vars }}
run: |
for i in "${{ inputs.env_vars }}"
do
printf "%s\n" $i >> $GITHUB_ENV
done

- name: 📦 Initialize
run: npm ci
env:
NODE_OPTIONS: ${{ inputs.node_options }}
- name: 📦 Initialize
run: npm ci
env:
NODE_OPTIONS: ${{ inputs.node_options }}

- name: 🛠 Build
run: PUBLIC_PATH=${{ inputs.publicPath }}/v2 GENERATE_SOURCEMAP=false CI= npm run build
env:
NODE_OPTIONS: ${{ inputs.node_options }}
- name: 🛠 Build
run: PUBLIC_PATH=${{ inputs.publicPath }}/v2 GENERATE_SOURCEMAP=false CI= npm run build
env:
NODE_OPTIONS: ${{ inputs.node_options }}

- name: 🚀 Upload to S3
if: github.event.repository.name != 'compass-federation-template'
run: |
npx s3-deploy './build/**/${{ inputs.remote }}' --cwd './build/' --bucket ${{ inputs.bucket }}/v2 --cacheControl 'max-age=300, s-maxage=2592000' --region eu-west-1
npx s3-deploy './build/**/*' --cwd './build/' --bucket ${{ inputs.bucket }}/v2 --cacheControl 'max-age=2592000' --region eu-west-1
sleep 10s
env:
- name: 🚀 Upload to S3
if: github.event.repository.name != 'compass-federation-template'
run: |
npx s3-deploy './build/**/${{ inputs.remote }}' --cwd './build/' --bucket ${{ inputs.bucket }}/v2 --cacheControl 'max-age=300, s-maxage=2592000' --region eu-west-1
npx s3-deploy './build/**/*' --cwd './build/' --bucket ${{ inputs.bucket }}/v2 --cacheControl 'max-age=2592000' --region eu-west-1
sleep 10s
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: 🚽 Purge Fastly
if: github.event.repository.name != 'compass-federation-template'
uses: Marfeel/github-actions/common/actions/purgeFastly@master
with:
fastly-key: ${{ secrets.FASTLY_KEY }}
service-id: ${{ secrets.FASTLY_SERVICE }}
- name: 🚽 Purge Fastly
if: github.event.repository.name != 'compass-federation-template'
uses: Marfeel/github-actions/common/actions/purgeFastly@master
with:
fastly-key: ${{ secrets.FASTLY_KEY }}
service-id: ${{ secrets.FASTLY_SERVICE }}
58 changes: 29 additions & 29 deletions .github/workflows/compass-federation-pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,68 +32,68 @@ jobs:
runs-on: ubuntu-latest
name: 📦 Install & cache
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: npm-cache
with:
path: node_modules
key: modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
modules-
- name: 'Install dependencies'
- name: "Install dependencies"
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
env:
NODE_OPTIONS: ${{ inputs.node_options }}

lint:
runs-on: ubuntu-latest
name: '🧹 Lint'
name: "🧹 Lint"
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: npm-cache
with:
path: node_modules
key: modules-${{ hashFiles('**/package-lock.json') }}
- name: 'Lint'
- name: "Lint"
run: npm run lint
env:
NODE_OPTIONS: ${{ inputs.node_options }}

test:
runs-on: ubuntu-latest
name: '✅ Tests'
name: "✅ Tests"
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: npm-cache
with:
path: node_modules
key: modules-${{ hashFiles('**/package-lock.json') }}
- name: 'Run tests'
- name: "Run tests"
run: npm run test

build:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: npm-cache
with:
path: node_modules
Expand All @@ -105,7 +105,7 @@ jobs:
do
printf "%s\n" $i >> $GITHUB_ENV
done
- name: 'Build'
- name: "Build"
run: PUBLIC_PATH=https://${{ inputs.bucket }}/pr/${{ env.VERSION }} GENERATE_SOURCEMAP=false CI= npm run build
env:
NODE_OPTIONS: ${{ inputs.node_options }}
Expand All @@ -117,25 +117,25 @@ jobs:
npx s3-deploy './build/**/*' --cwd './build/' --bucket ${{ inputs.bucket }}/pr/${{ env.VERSION }} --cacheControl max-age=2592000 --region eu-west-1
sleep 10s
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NODE_OPTIONS: ${{ inputs.node_options }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NODE_OPTIONS: ${{ inputs.node_options }}

- name: Find PB Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ env.VERSION }}
comment-author: 'github-actions[bot]'
comment-author: "github-actions[bot]"
body-includes: |
:woman_scientist: We've created a preview branch for you! Check your code here:

- name: Create or update PB comment
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ env.VERSION }}
body: |
:woman_scientist: We've created a preview branch for you! Check your code here: [https://hub.marfeel.com?env=${{ inputs.host_var }},https://${{ inputs.bucket }}/pr/${{ env.VERSION }}/static/js](https://hub.marfeel.com?env=${{ inputs.host_var }},https://${{ inputs.bucket }}/pr/${{ env.VERSION }}/static/js)
reactions: rocket
edit-mode: replace
edit-mode: replace