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

Create uid2 client side secure signals page #163

Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/publish-secure-signal-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,31 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-client-side:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- 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 }}/iabtechlab/uid2-secure-signals-example-client-side
tags: |
type=sha,format=short
type=raw,value=latest
- name: Build and push Docker client_side image
uses: docker/build-push-action@v5
with:
context: examples/google-secure-signals-integration/client_side
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want to couple all of these between a release file for each and then a publish file for all three together? Or do we want to make each one a separate publish yml file? This can be done now or later.

Also side note: we should probably rename the "standard" secure signals site to client-server which we can clean up later also

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As much as it seems wasteful to have three separate files, I think it makes sense to do that. We won't always be (rarely be?) modifying all of them at once so creating new versions/images with no changes seems bad. what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

36 changes: 36 additions & 0 deletions .github/workflows/release-secure-signals-client-side-uid2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release Secure Signal Examples Docker Image for UID2 Client Side
run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish Pre-release' || format('Release {0}', inputs.release_type)}} Secure Signal Examples Docker Image for UID2 Client Side by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: The type of release
options:
- Major
- Minor
- Patch
- Snapshot
required: true

jobs:
incrementVersionNumber:
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v2
with:
release_type: ${{ inputs.release_type }}
working_dir: examples/google-secure-signals-integration/client_side
secrets: inherit

publishForSecureSignalsExampleClientSide:
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-docker-versioned.yaml@v3
needs: incrementVersionNumber
with:
new_version: ${{ needs.incrementVersionNumber.outputs.new_version }}
image_tag: ${{ needs.incrementVersionNumber.outputs.image_tag }}
release_type: ${{ inputs.release_type }}
docker_file: examples/google-secure-signals-integration/client_side/Dockerfile
docker_context: examples/google-secure-signals-integration/client_side
docker_image_name: iabtechlab/uid2-secure-signals-example-client-side
docker_registry: ghcr.io
force_release: no
secrets: inherit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:20.11.0-alpine3.18

WORKDIR /usr/src/app

COPY . .
RUN npm install

EXPOSE 3000
CMD [ "npm", "start" ]
Loading