Merge pull request #6 from LakinduOshadha/main #12
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: Platformer Generated mylocal-gigeks Build | |
'on': | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: | |
- ubuntu-latest | |
env: | |
SERVICE_NAME: ghcr.io/ldflk/mylocal | |
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/heads/}-${{github.sha}} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.CONTAINER_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_PASSWORD_995D5E89_D670_4652_97C2_8FD741ABB122 }} | |
- name: Build the Docker image | |
run: docker build --tag ${SERVICE_NAME}:${{steps.event-version.outputs.SOURCE_TAG }} --file Dockerfile --build-arg SERVER_HOST=${{secrets.SERVER_URL}} --build-arg GIG_SERVER=${{secrets.GIG_SERVER}} --build-arg GEO_SERVER=${{secrets.GEO_SERVER}} . | |
- 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_2B8DC80C_5916_4568_A545_4BDDE5E5C701}} | |
project-id: ${{secrets.PROJECT_ID_2B8DC80C_5916_4568_A545_4BDDE5E5C701}} | |
token: ${{secrets.AUTOGENERATED_CICD_2B8DC80C_5916_4568_A545_4BDDE5E5C701}} | |
image-name: ${{env.SERVICE_NAME}} | |
tag: ${{steps.event-version.outputs.SOURCE_TAG }} | |
container-id: cb046f2d-ee37-4fb7-93cb-b338abf938a1 |