Fix OP:3076 #2
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: Release - develop | |
on: | |
push: | |
branches: | |
- develop | |
- feature/nextjs | |
workflow_dispatch: | |
env: | |
DOCKER_REGISTRY_URL: 'registry.dev.intra.fph.hu' | |
DOCKER_BUILD_TARGET: 'production' | |
DOCKER_BUILD_FILE: 'docker/dev/Dockerfile' | |
DOCKER_IMAGE: 'docker/participatory-client' | |
HELM_REPOSITORY_URL: 'nexus.dev.intra.fph.hu' | |
HELM_REPOSITORY_NAME: 'helm' | |
HELM_REPOSITORY_ALIAS: 'budapest-portal' | |
HELM_CHART_NAME: 'bpp-frontend' | |
HELM_RELEASE_NAME: 'client' | |
HELM_VALUES_FILE: 'values.dev.yaml' | |
APP_NAMESPACE: 'participatory' | |
jobs: | |
create-image-tag: | |
name: Create container image tag | |
runs-on: ['fph-dev-cluster'] | |
outputs: | |
imageTag: ${{ steps.tag-helper.outputs.imageTag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: 'Tag helper' | |
id: tag-helper | |
uses: 'fphgov/actions-image-tag-helper@master' | |
with: | |
is_add_short_commit_hash: true | |
build-image: | |
name: Build container image | |
runs-on: ['fph-dev-cluster'] | |
needs: | |
- create-image-tag | |
timeout-minutes: 600 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Build image | |
uses: aevea/action-kaniko@master | |
with: | |
image: ${{ env.DOCKER_IMAGE }} | |
build_file: ${{ env.DOCKER_BUILD_FILE }} | |
target: ${{ env.DOCKER_BUILD_TARGET }} | |
registry: ${{ env.DOCKER_REGISTRY_URL }} | |
username: ${{ secrets.DEV_NEXUS_USER }} | |
password: ${{ secrets.DEV_NEXUS_PASSWD }} | |
tag_with_latest: true | |
tag: ${{ needs.create-image-tag.outputs.imageTag }} | |
extra_args: '--skip-tls-verify --build-arg ARG_BACKEND_URL=http://backend-php-nginx:8080 --build-arg ARG_NEXT_PUBLIC_URL=https://reszveteli.budapest.hu --build-arg ARG_TZ="Europe/Budapest" --build-arg ARG_JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }} --build-arg ARG_NEXT_PUBLIC_BASENAME="/" --build-arg ARG_NEXT_PUBLIC_FILES_PATH=/files --build-arg ARG_NEXT_PUBLIC_MAPBOX_TOKEN=${{ secrets.NEXT_PUBLIC_MAPBOX_TOKEN }} --build-arg ARG_NEXT_PUBLIC_SITE_KEY=${{ secrets.NEXT_PUBLIC_SITE_KEY }} --build-arg ARG_NEXT_PUBLIC_MATOMO_URL=https://matomo.budapest.hu --build-arg ARG_NEXT_PUBLIC_MATOMO_SITE_ID=9 --build-arg ARG_NEXT_PUBLIC_FACEBOOK_PIXEL=1184088115623088' | |
deploy: | |
name: Deploy | |
runs-on: ['fph-dev-cluster'] | |
needs: | |
- build-image | |
- create-image-tag | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Deploy | |
uses: 'fphgov/actions-helm-deploy@master' | |
with: | |
helm_repository_url: ${{ env.HELM_REPOSITORY_URL }} | |
helm_repository_name: ${{ env.HELM_REPOSITORY_NAME }} | |
helm_repository_alias: ${{ env.HELM_REPOSITORY_ALIAS }} | |
helm_repository_user: ${{ secrets.DEV_NEXUS_USER }} | |
helm_repository_password: ${{ secrets.DEV_NEXUS_PASSWD }} | |
helm_repository_insecure: 'true' | |
helm_chart: ${{ env.HELM_CHART_NAME }} | |
namespace: ${{ env.APP_NAMESPACE }} | |
app_name: ${{ env.HELM_RELEASE_NAME }} | |
kubeconfig: ${{ secrets.DEV_KUBECONFIG }} | |
helm_values_file: ${{ env.HELM_VALUES_FILE }} | |
helm_repository_upgrade_extra_args: | | |
--set image.tag=${{ needs.create-image-tag.outputs.imageTag }} |