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: Build react-postgresql-express/app-code/server | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'react-postgresql-express/app-code/server/**' | |
env: | |
SERVICE_NAME: "rpe-ci" | |
RELEASE_STREAM: "QA" | |
QA_BRANCH: "master" | |
CP_URL: "https://facetsdemo.console.facets.cloud/" | |
EMAIL: "[email protected]" | |
TOKEN: "5064d87b-a260-4c70-974b-0a1736b8b53a" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install @facets-cloud/facetsctl | |
run: | | |
echo "Installing @facets-cloud/facetsctl" | |
npm install -g @facets-cloud/facetsctl | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Docker build | |
run: | | |
cd react-postgresql-express/app-code/server/ | |
TAG_NAME=$(echo $GITHUB_REF | awk -F/ '{print $3}') | |
echo "Building Docker Image" | |
docker build -t $SERVICE_NAME:${TAG_NAME}_${GITHUB_RUN_ID} . | |
- name: Push Docker Image | |
run: | | |
TAG_NAME=$(echo $GITHUB_REF | awk -F/ '{print $3}') | |
echo "Logging into Facets Cloud: $EMAIL - $TAG_NAME" | |
facetsctl login -c https://facetsdemo.console.facets.cloud -u [email protected] -t 5064d87b-a260-4c70-974b-0a1736b8b53a | |
# facetsctl login -u $EMAIL -t $TOKEN -c $CP_URL | |
echo "Using release stream $RELEASE_STREAM" | |
echo "Pushing Docker Image" | |
facetsctl push --docker-image $SERVICE_NAME:${TAG_NAME}_${GITHUB_RUN_ID} --artifact-name $SERVICE_NAME --registration-type CLUSTER --registration-value 65dfece930bfd70007e7a0f0 --external-id $GITHUB_RUN_ID --artifactory facets-config-auto | |