Skip to content

auth enpoint that just returns nonce for google oauth login #449

auth enpoint that just returns nonce for google oauth login

auth enpoint that just returns nonce for google oauth login #449

Workflow file for this run

name: Scala CI
on:
push:
branches:
- master
- release/*
- dev/*
- cluster/*
tags:
- '*'
pull_request:
branches:
- master
- release/*
- dev/*
- cluster/*
workflow_dispatch:
jobs:
tarsrc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: generate routes
run: ./py-build-routes.py 10
- name: tar all
run: tar -zcf src.tar app conf lib project public sbt-dist script seed test build.sbt sbt sbt.bat sbt-debug
- name: save tar
uses: actions/upload-artifact@v3
with:
name: src.tar
path: src.tar
imagedev:
runs-on: ubuntu-20.04
if: github.event_name != 'pull_request'
needs: tarsrc
steps:
- uses: actions/checkout@v3
- name: Fetch artifact
uses: actions/download-artifact@v3
with:
name: src.tar
- name: set docker env (branch non PR)
if: github.ref_type == 'branch' && github.event_name != 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-dev-snapshot" >> $GITHUB_ENV
- name: set docker env (branch PR)
if: github.ref_type == 'branch' && github.event_name == 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_HEAD_REF} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-dev-snapshot" >> $GITHUB_ENV
- name: set docker env (tag)
if: github.ref_type == 'tag'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/tags/} | tr / _ | sed 's/^v//g')" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-dev-release" >> $GITHUB_ENV
- name: echo vars
run: |
echo ${{ env.REF_NAME }}
echo ${{ env.ECR_REPO }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_TOKEN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: build image
run: docker build -t ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }} -f Dockerfile.build .
- name: tag & push aws
run: docker push ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
buildpub:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: generate routes
run: ./py-build-routes.py 1
- name: write git hash
run: sed -i 's/\$\$GITHUB_SHA\$\$/'"${GITHUB_SHA}"'/' app/org/sailcbi/APIServer/Server/CBIBootLoaderLive.scala
- name: build deb
run: sbt debian:packageBin
- name: rename deb
run: mv target/CBI-DB-API_0.1.0_all.deb target/CBI-DB-API_0.1.0_all-pub.deb
- name: save deb
uses: actions/upload-artifact@v3
with:
name: CBI-DB-API_0.1.0_all-pub.deb
path: target/CBI-DB-API_0.1.0_all-pub.deb
imagepub:
runs-on: ubuntu-20.04
needs: buildpub
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- name: Fetch artifact
uses: actions/download-artifact@v3
with:
name: CBI-DB-API_0.1.0_all-pub.deb
- name: rename image
run: mv CBI-DB-API_0.1.0_all-pub.deb CBI-DB-API_0.1.0_all.deb
- name: set docker env (branch non PR)
if: github.ref_type == 'branch' && github.event_name != 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-pub-snapshot" >> $GITHUB_ENV
- name: set docker env (branch PR)
if: github.ref_type == 'branch' && github.event_name == 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_HEAD_REF} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-pub-snapshot" >> $GITHUB_ENV
- name: set docker env (tag)
if: github.ref_type == 'tag'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/tags/} | tr / _ | sed 's/^v//g')" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-pub-release" >> $GITHUB_ENV
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_TOKEN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: echo vars
run: |
echo ${{ env.REF_NAME }}
echo ${{ env.ECR_REPO }}
- name: build image
run: docker build -t ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }} .
- name: tag & push aws
run: docker push ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
buildstaff:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: generate routes
run: ./py-build-routes.py 10
- name: write git hash
run: sed -i 's/\$\$GITHUB_SHA\$\$/'"${GITHUB_SHA}"'/' app/org/sailcbi/APIServer/Server/CBIBootLoaderLive.scala
- name: build deb
run: sbt debian:packageBin
- name: rename deb
run: mv target/CBI-DB-API_0.1.0_all.deb target/CBI-DB-API_0.1.0_all-staff.deb
- name: save artifact
uses: actions/upload-artifact@v3
with:
name: CBI-DB-API_0.1.0_all-staff.deb
path: target/CBI-DB-API_0.1.0_all-staff.deb
imagestaff:
runs-on: ubuntu-20.04
needs: buildstaff
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- name: Fetch artifact
uses: actions/download-artifact@v3
with:
name: CBI-DB-API_0.1.0_all-staff.deb
- name: rename image
run: mv CBI-DB-API_0.1.0_all-staff.deb CBI-DB-API_0.1.0_all.deb
- name: set docker env (branch non PR)
if: github.ref_type == 'branch' && github.event_name != 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-staff-snapshot" >> $GITHUB_ENV
- name: set docker env (branch PR)
if: github.ref_type == 'branch' && github.event_name == 'pull_request'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_HEAD_REF} | tr / _)" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-staff-snapshot" >> $GITHUB_ENV
- name: set docker env (tag)
if: github.ref_type == 'tag'
shell: bash
run: |
echo "REF_NAME=$(echo ${GITHUB_REF#refs/tags/} | tr / _ | sed 's/^v//g')" >> $GITHUB_ENV
echo "ECR_REPO=cbidb-api-staff-release" >> $GITHUB_ENV
- name: echo vars
run: |
echo ${{ env.REF_NAME }}
echo ${{ env.ECR_REPO }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_TOKEN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: build image
run: docker build -t ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }} .
- name: tag & push aws
run: docker push ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPO }}:${{ env.REF_NAME }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}