Skip to content
Open
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
168 changes: 84 additions & 84 deletions .github/actions/cdn_deployment_aws/action.yaml
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
name: CDN Deployment for AWS
description: Deploys to AWS CDN and optionally invalidates the path in CloudFront
inputs:
artifact:
description: Name of the artifact
required: true
invalidate_paths:
description: paths that get invalidated in cloud front
default: ''
aws_account_id:
description: The AWS account id
required: true
aws_distribution_id:
description: The CloudFront description id
required: true
aws_bucket_name:
description: The AWS bucket to sync
required: true
deploy_index_html:
description: Deploy a simple index.html file to S3 root
default: 'false'
runs:
using: 'composite'
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::${{ inputs.aws_account_id }}:role/github-runner-for-cdn
- name: Check Identity
shell: bash
run: aws sts get-caller-identity
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact }}
path: ./download
- name: Deploy
shell: bash
run: aws s3 sync ./download s3://${{ inputs.aws_bucket_name }}
- name: Create and Deploy Index HTML
if: ${{ inputs.deploy_index_html == 'true' }}
shell: bash
run: |
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UID2/EUID SDK Files</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
h1 { color: #333; }
.file-list { margin: 20px 0; }
.file-item { margin: 10px 0; padding: 10px; background: #f5f5f5; border-radius: 5px; }
.file-link { text-decoration: none; color: #0066cc; font-weight: bold; }
.file-link:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>UID2/EUID SDK Files</h1>
<p>This directory contains the latest SDK files for UID2 and EUID integration.</p>
<div class="file-list">
<div class="file-item">
<strong>SDK Files:</strong> Available in this directory
</div>
<div class="file-item">
<strong>Documentation:</strong> <a href="https://unifiedid.com/docs/guides/summary-guides" target="_blank" class="file-link">Visit Documentation</a>
</div>
</div>
</body>
</html>' > index.html
aws s3 cp index.html s3://${{ inputs.aws_bucket_name }}/index.html
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@cacab256f2bd90d1c04447a7d6afdaf6f346e7b3 # v2
env:
DISTRIBUTION: ${{ inputs.aws_distribution_id }}
PATHS: ${{ inputs.invalidate_paths }}
AWS_REGION: us-east-2
name: CDN Deployment for AWS
description: Deploys to AWS CDN and optionally invalidates the path in CloudFront
inputs:
artifact:
description: Name of the artifact
required: true
invalidate_paths:
description: paths that get invalidated in cloud front
default: ''
aws_account_id:
description: The AWS account id
required: true
aws_distribution_id:
description: The CloudFront description id
required: true
aws_bucket_name:
description: The AWS bucket to sync
required: true
deploy_index_html:
description: Deploy a simple index.html file to S3 root
default: 'false'
runs:
using: 'composite'

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::${{ inputs.aws_account_id }}:role/github-runner-for-cdn

- name: Check Identity
shell: bash
run: aws sts get-caller-identity

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.artifact }}
path: ./download

- name: Deploy
shell: bash
run: aws s3 sync ./download s3://${{ inputs.aws_bucket_name }}

- name: Create and Deploy Index HTML
if: ${{ inputs.deploy_index_html == 'true' }}
shell: bash
run: |
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UID2/EUID SDK Files</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
h1 { color: #333; }
.file-list { margin: 20px 0; }
.file-item { margin: 10px 0; padding: 10px; background: #f5f5f5; border-radius: 5px; }
.file-link { text-decoration: none; color: #0066cc; font-weight: bold; }
.file-link:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>UID2/EUID SDK Files</h1>
<p>This directory contains the latest SDK files for UID2 and EUID integration.</p>
<div class="file-list">
<div class="file-item">
<strong>SDK Files:</strong> Available in this directory
</div>
<div class="file-item">
<strong>Documentation:</strong> <a href="https://unifiedid.com/docs/guides/summary-guides" target="_blank" class="file-link">Visit Documentation</a>
</div>
</div>
</body>
</html>' > index.html
aws s3 cp index.html s3://${{ inputs.aws_bucket_name }}/index.html

- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@cacab256f2bd90d1c04447a7d6afdaf6f346e7b3 # v2
env:
DISTRIBUTION: ${{ inputs.aws_distribution_id }}
PATHS: ${{ inputs.invalidate_paths }}
AWS_REGION: us-east-2
2 changes: 1 addition & 1 deletion .github/workflows/build-sdk-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
incrementVersionNumber:
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v3
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@sch-UID2-6742-update-node20-actions
with:
release_type: ${{ inputs.release_type }}
merge_environment: ${{ github.ref_protected && 'ci-auto-merge' || '' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -32,6 +32,6 @@ jobs:
- run: npm test
working-directory: ${{ env.WORKING_DIR }}
- name: Vulnerability Scan
uses: IABTechLab/uid2-shared-actions/actions/vulnerability_scan@v3
uses: IABTechLab/uid2-shared-actions/actions/vulnerability_scan@sch-UID2-6742-update-node20-actions
with:
scan_type: 'fs'
38 changes: 38 additions & 0 deletions .github/workflows/publish-cstg-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release CSTG Example Docker Image
run-name: ${{ github.action_ref == 'refs/head/main' && 'Release' || 'Publish Pre-release' }} CSTG Example Docker Image by @${{ github.actor }}

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: iabtechlab/uid2-cstg-example

jobs:
build-cstg-example:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short
- name: Build and push Docker CSTG Example image
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: examples/cstg
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
38 changes: 38 additions & 0 deletions .github/workflows/publish-js-sdk-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release JS SDK Example Docker Image
run-name: ${{ github.action_ref == 'refs/head/main' && 'Release' || 'Publish Pre-release' }} JS SDK Example Docker Image by @${{ github.actor }}

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: iabtechlab/uid2-js-sdk-example

jobs:
build-js-sdk-example:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short
- name: Build and push Docker JS SDK Example image
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: examples/js-sdk
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading