Skip to content

Fix Signalhub disabled switch #2638

Fix Signalhub disabled switch

Fix Signalhub disabled switch #2638

Workflow file for this run

name: Continuous Integration
on:
push:
branches: ['**']
tags: ['**']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
node: [18.15.0]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
with:
fetch-depth: 0
- name: Install node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: ${{ matrix.node }}
- name: Installing
run: npm install
- name: Building
run: npm run build
- name: Testing
run: npm run test
publish:
name: Publish Artifacts
needs: [build]
permissions:
id-token: write
contents: read
packages: write
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/'))
strategy:
matrix:
os: [ubuntu-latest]
node: [18.15.0]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
with:
fetch-depth: 0
- name: Install node 16
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: ${{ matrix.node }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
with:
aws-region: eu-central-1
role-to-assume: 'arn:aws:iam::505630707203:role/interop-github-ecr-dev'
role-session-name: interop-frontend-${{ github.job }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@2fc7aceee09e9e4a7105c0d060c656fad0b4f63d # v1
- name: Calculating image version
id: version
run: |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "version=${{ github.ref_name }}-latest" >> $GITHUB_OUTPUT
fi
- name: Build docker image
run: docker build --network host -t $ECR_REGISTRY/interop-frontend:$VERSION .
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
VERSION: ${{ steps.version.outputs.version }}
- name: Push image to Amazon ECR
run: docker push $ECR_REGISTRY/interop-frontend:$VERSION
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
VERSION: ${{ steps.version.outputs.version }}