Skip to content

feat: implemented background requests #235

feat: implemented background requests

feat: implemented background requests #235

Workflow file for this run

name: Tests
permissions:
contents: read
on:
pull_request:
jobs:
publish:
runs-on: ubuntu-22.04
outputs:
sha-tag: ${{ steps.metadata.outputs.sha-tag }}
image: ${{ steps.metadata.outputs.image }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check for formatting errors
run: npm run format:check
- name: Run tests
run: npm run test:ci
# This can be removed one we deploy to Netlify and Storybook deploying is a check for PRs. See https://github.com/pomerium/mcp-app-demo/issues/123
- name: Build Storybook
run: npm run build-storybook
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
- name: Login to DockerHub
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare Image Metadata
id: metadata
run: |
IMAGE=pomerium/mcp-app-demo
SHA_TAG=git-${GITHUB_SHA::8}
TAGS=${IMAGE}:main
TAGS=${TAGS},${IMAGE}:${SHA_TAG}
TS=$(date +%Y%m%d%H%M%S)
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "timestamp=${TS}" >> $GITHUB_OUTPUT
echo "name=${IMAGE}" >> $GITHUB_OUTPUT
echo "image=${IMAGE}" >> $GITHUB_OUTPUT
echo "sha-tag=${SHA_TAG}" >> $GITHUB_OUTPUT
- name: Docker Publish - Main
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1
with:
context: .
file: ./Dockerfile
push: false
platforms: linux/amd64
tags: ${{ steps.metadata.outputs.tags }}
labels: |
org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }}
org.opencontainers.image.name=${{ steps.metadata.outputs.name }}
org.opencontainers.image.revision=${{ github.sha }}