From 23d10a46d7fdf40c595ef03626178b1561f3d682 Mon Sep 17 00:00:00 2001 From: Kosala Gangabadage Date: Thu, 28 Apr 2022 09:10:04 +0530 Subject: [PATCH] Platformer GitHub Action Created --- ...r-9f99429f-1443-4fb8-9afa-8b3a9d362e90.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/platformer-9f99429f-1443-4fb8-9afa-8b3a9d362e90.yml diff --git a/.github/workflows/platformer-9f99429f-1443-4fb8-9afa-8b3a9d362e90.yml b/.github/workflows/platformer-9f99429f-1443-4fb8-9afa-8b3a9d362e90.yml new file mode 100644 index 00000000..8a6b6811 --- /dev/null +++ b/.github/workflows/platformer-9f99429f-1443-4fb8-9afa-8b3a9d362e90.yml @@ -0,0 +1,36 @@ +name: Platformer Generated ui-stag-push Build +'on': + push: + tags: + - stag* +jobs: + build: + runs-on: + - ubuntu-latest + env: + SERVICE_NAME: ghcr.io/eclk/results-tabulation + CONTAINER_REGISTRY: ghcr.io + steps: + - uses: actions/checkout@v2 + - name: Set Version + id: event-version + run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.CONTAINER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.DOCKER_PASSWORD_9F99429F_1443_4FB8_9AFA_8B3A9D362E90 }} + - name: Build the Docker image + run: docker build --tag ${SERVICE_NAME}:${{steps.event-version.outputs.SOURCE_TAG }} --file ./results-tabulation-ui/Dockerfile ./results-tabulation-ui/ --build-arg AUTH_APP_URL="https://tabulations.ecstage.opensource.lk" --build-arg TABULATION_API_URL="https://apim-gw.ecstag.opensource.lk/tabulation/0.1.0" + - name: GitHub Image Push + run: docker push $SERVICE_NAME:${{steps.event-version.outputs.SOURCE_TAG }} + - name: Platformer Deploy + uses: platformer-com/build-deploy-action@v1 + with: + org-id: ${{secrets.ORG_ID_FCB1AEBE_71DB_4911_9067_F5FA9BA73D4D}} + project-id: ${{secrets.PROJECT_ID_FCB1AEBE_71DB_4911_9067_F5FA9BA73D4D}} + token: ${{secrets.AUTOGENERATED_CICD_FCB1AEBE_71DB_4911_9067_F5FA9BA73D4D}} + image-name: ${{env.SERVICE_NAME}} + tag: ${{steps.event-version.outputs.SOURCE_TAG }} + container-id: 38522196-e2fb-453e-9729-2aac6c203042