Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Nov 28, 2024
2 parents 43214f6 + 481d21f commit fcc49d0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 103 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Cloud infrastructure Cleanup
on:
workflow_dispatch:
repository_dispatch:
types: [cleanup-infrastructure]
types: [ cleanup-infrastructure ]
schedule:
- cron: "0 2 * * *" # Every day at 2AM.

Expand Down Expand Up @@ -37,22 +37,3 @@ jobs:
--access-key-id ${{ env.AWS_ACCESS_KEY_ID }}
--secret-access-key ${{ env.AWS_SECRET_ACCESS_KEY }}
--session-token ${{ env.AWS_SESSION_TOKEN }}
aws-cloudfront-functions-cleanup:
runs-on: ubuntu-latest
needs: [aws-nuke]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/setup-node@v4
with:
node-version: 20

- uses: actions/checkout@v4

- name: Install dependencies
run: yarn --immutable

- name: Run Cloudfront Functions Cleanup
run: node ./.github/workflows/cleanup/cleanupCloudfrontFunctions.js
2 changes: 2 additions & 0 deletions .github/workflows/cleanup/aws-nuke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ accounts:

resource-types:
# These resource types will be destroyed.
# List of all resource types: https://github.com/rebuy-de/aws-nuke/tree/main/resources
targets:
- APIGatewayV2API
- S3Object
Expand All @@ -39,6 +40,7 @@ resource-types:
- LambdaFunction
- CloudFrontDistribution
- CloudFrontDistributionDeployment
- CloudFrontFunction
- CloudFrontOriginAccessIdentity
- CognitoUserPool
- CognitoUserPoolClient
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/cleanup/cleanupCloudfrontFunctions.js

This file was deleted.

46 changes: 12 additions & 34 deletions .github/workflows/pullRequestsCommandCypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@ jobs:
with:
node-version: 20
- uses: actions/checkout@v4
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Get base branch
id: base-branch
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: >-
echo "base-branch=$(hub pr show ${{ github.event.issue.number }} -f
%B)" >> $GITHUB_OUTPUT
echo "base-branch=$(gh pr view ${{ github.event.issue.number }} --json
baseRefName -q .baseRefName)" >> $GITHUB_OUTPUT
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
Expand Down Expand Up @@ -114,11 +112,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -158,11 +154,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List Cypress tests folders
Expand Down Expand Up @@ -208,11 +202,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -343,11 +335,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -390,11 +380,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List Cypress tests folders
Expand Down Expand Up @@ -443,11 +431,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -582,11 +568,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -630,11 +614,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List Cypress tests folders
Expand Down Expand Up @@ -683,11 +665,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -822,11 +802,9 @@ jobs:
- uses: actions/checkout@v4
with:
path: ${{ needs.baseBranch.outputs.base-branch }}
- name: Install Hub Utility
run: sudo apt-get install -y hub
- name: Checkout Pull Request
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
run: hub pr checkout ${{ github.event.issue.number }}
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/cache@v4
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/wac/pullRequestsCommandCypress.wac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ const runBuildCacheSteps = createRunBuildCacheSteps({ workingDirectory: DIR_WEBI

const createCheckoutPrSteps = () =>
[
{ name: "Install Hub Utility", run: "sudo apt-get install -y hub" },
{
name: "Checkout Pull Request",
"working-directory": DIR_WEBINY_JS,
run: "hub pr checkout ${{ github.event.issue.number }}",
run: "gh pr checkout ${{ github.event.issue.number }}",
env: { GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" }
}
] as NonNullable<NormalJob["steps"]>;
Expand Down Expand Up @@ -251,12 +250,11 @@ export const pullRequestsCommandCypress = createWorkflow({
"base-branch": "${{ steps.base-branch.outputs.base-branch }}"
},
steps: [
{ name: "Install Hub Utility", run: "sudo apt-get install -y hub" },
{
name: "Get base branch",
id: "base-branch",
env: { GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}" },
run: 'echo "base-branch=$(hub pr show ${{ github.event.issue.number }} -f %B)" >> $GITHUB_OUTPUT'
run: 'echo "base-branch=$(gh pr view ${{ github.event.issue.number }} --json baseRefName -q .baseRefName)" >> $GITHUB_OUTPUT'
}
]
}),
Expand Down

0 comments on commit fcc49d0

Please sign in to comment.