first commit #1
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
name: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: temporaliotest/replay-versioning-demo | |
steps: | |
### START: Generate pretty build ID | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Generate Build ID | |
run: node scripts/generate-build-id.mjs ${{ github.run_id }} ${{ github.run_attempt }} | |
### END: Generate pretty build ID | |
- name: Print Docker Build Tag | |
run: echo $IMAGE_NAME:$BUILD_ID | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ${{ env.IMAGE_NAME }}:${{ env.BUILD_ID }} | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
BUILD_ID=${{ env.BUILD_ID }} | |
release-validation: | |
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[compatible-') }} | |
runs-on: ubuntu-latest | |
env: | |
TEMPORAL_CLIENT_CERT: ${{ secrets.TEMPORAL_CLIENT_CERT }} | |
TEMPORAL_CLIENT_KEY: ${{ secrets.TEMPORAL_CLIENT_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Create Certs Dir | |
run: node scripts/create-certs-dir.mjs | |
- name: Check Workflow Compatiblity | |
run: node lib/check-compatibility.js "${{ github.event.pull_request.title }}" | |
env: | |
TEMPORAL_ADDRESS: replay-versioning-demo.a2dd6.tmprl.cloud | |
TEMPORAL_NAMESPACE: replay-versioning-demo.a2dd6 | |
TEMPORAL_TLS_CERT: /tmp/temporal-certs/client.pem | |
TEMPORAL_TLS_KEY: /tmp/temporal-certs/client.key |