Skip to content

Bump path-to-regexp and express in /pubsub/javascript/subscriber #31

Bump path-to-regexp and express in /pubsub/javascript/subscriber

Bump path-to-regexp and express in /pubsub/javascript/subscriber #31

name: javascript pubsub quickstart
on:
push:
branches:
- main
paths:
- .github/workflows/pubsub_javascript.yaml
- pubsub/javascript/**
pull_request:
branches:
- main
paths:
- .github/workflows/pubsub_javascript.yaml
- pubsub/javascript/**
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
environment: shared-production
if: github.repository_owner == 'diagridio'
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: build local
run: |
cd pubsub/javascript
npm install --prefix ./publisher && npm install --prefix ./subscriber
- name: Configure AWS credentials
if: github.event_name != 'pull_request'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_CI_ROLE }}
aws-region: ${{ vars.AWS_CI_REGION }}
- name: Login to Amazon ECR
if: github.event_name != 'pull_request'
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Set up Docker Buildx
if: github.event_name != 'pull_request'
uses: docker/setup-buildx-action@v3.6.1
- name: build and push publisher image
if: github.event_name != 'pull_request'
working-directory: pubsub/javascript/publisher
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ steps.login-ecr.outputs.registry }}/${{ vars.AWS_PUBLIC_ECR_ALIAS }}/pubsub-javascript-publisher-qs . --push
- name: build and push subscriber image
if: github.event_name != 'pull_request'
working-directory: pubsub/javascript/subscriber
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ steps.login-ecr.outputs.registry }}/${{ vars.AWS_PUBLIC_ECR_ALIAS }}/pubsub-javascript-subscriber-qs . --push