-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move CI pipeline to github actions (#175)
* switch to github actions * update version in webtask.json
- Loading branch information
1 parent
3a3d995
commit 5345b37
Showing
8 changed files
with
71 additions
and
103 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
AWS_ROLE: ${{ secrets.awsIAMS3UploadRole }} | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '10' | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run Build | ||
run: yarn run build | ||
|
||
- name: Configure AWS Credentials using OIDC | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 on 2025-01-06 | ||
with: | ||
role-to-assume: ${{ env.AWS_ROLE }} | ||
role-session-name: github-action-account-link-extension-publish | ||
aws-region: us-west-1 | ||
|
||
- name: Run Deploy | ||
run: sh tools/cdn.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches-ignore: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '10' | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run Tests | ||
run: yarn run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.9 | ||
10 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
CURRENT_VERSION=$(node tools/attribute.js version) | ||
EXTENSION_NAME="auth0-account-link-extension" | ||
EXTENSION_NAME="auth0-account-link" | ||
|
||
CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/css/$EXTENSION_NAME/$CURRENT_VERSION/ | grep "link.min.css") | ||
ADMIN_CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/css/$EXTENSION_NAME/$CURRENT_VERSION/ | grep "admin.min.css") | ||
CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/ | grep "link.$CURRENT_VERSION.min.css") | ||
ADMIN_CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/ | grep "admin.$CURRENT_VERSION.min.css") | ||
|
||
if [ ! -z "$CDN_EXISTS" ]; then | ||
echo "There is already a version $CURRENT_VERSION in the cdn. Skipping cdn publish…" | ||
else | ||
aws s3 cp public/css/link.min.css s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/$CURRENT_VERSION/link.min.css --region us-west-1 --quiet --cache-control "max-age=86400" --acl public-read | ||
aws s3 cp dist/assets/link.$CURRENT_VERSION.min.css s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/link.$CURRENT_VERSION.min.css --region us-west-1 --cache-control "max-age=86400" --acl public-read | ||
echo "$CURRENT_VERSION uploaded to the cdn" | ||
fi | ||
|
||
if [ ! -z "$ADMIN_CDN_EXISTS" ]; then | ||
echo "There is already a version $CURRENT_VERSION in the cdn. Skipping cdn publish…" | ||
else | ||
aws s3 cp public/css/admin.min.css s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/$CURRENT_VERSION/admin.min.css --region us-west-1 --quiet --cache-control "max-age=86400" --acl public-read | ||
aws s3 cp dist/assets/admin.$CURRENT_VERSION.min.css s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/admin.$CURRENT_VERSION.min.css --region us-west-1 --cache-control "max-age=86400" --acl public-read | ||
echo "$CURRENT_VERSION uploaded to the cdn" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters