chore: add fdk-search-service host #89
Workflow file for this run
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: Deploy to staging (ipv4 & ipv6) | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy-staging-ipv4: | |
name: Deploy ingress(ipv4) to staging environment when pull request is created | |
if: github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create yaml file from secret | |
id: write_file | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'secret.yaml' | |
encodedString: ${{ secrets.DIGDIR_FDK_INGRESS_STAGING_IPV4 }} | |
- name: Apply Helm template | |
run: | | |
helm template -f ${{ steps.write_file.outputs.filePath }} \ | |
./helm-sources-staging/ > ./kubectlapply.yaml | |
chmod o+w ./kubectlapply.yaml | |
cat kubectlapply.yaml | |
- name: Auth gcloud CLI for deploy | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }} | |
- name: Get credentials | |
uses: google-github-actions/get-gke-credentials@v1 | |
with: | |
cluster_name: digdir-fdk-dev | |
location: europe-north1-a | |
- name: Deploy to GCP & check status | |
run: | | |
kubectl apply -f ./kubectlapply.yaml --force | |
- name: Notify slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: 'Application: ingress(ipv4) | Environment: staging' | |
fields: commit,author,workflow | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() | |
deploy-staging-ipv6: | |
name: Deploy ingress(ipv6) to staging environment when pull request is created | |
if: github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create yaml file from secret | |
id: write_file | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'secret.yaml' | |
encodedString: ${{ secrets.DIGDIR_FDK_INGRESS_STAGING_IPV6 }} | |
- name: Apply Helm template | |
run: | | |
helm template -f ${{ steps.write_file.outputs.filePath }} \ | |
./helm-sources-staging/ > ./kubectlapply.yaml | |
chmod o+w ./kubectlapply.yaml | |
cat kubectlapply.yaml | |
- name: Auth gcloud CLI for deploy | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }} | |
- name: Get credentials | |
uses: google-github-actions/get-gke-credentials@v1 | |
with: | |
cluster_name: digdir-fdk-dev | |
location: europe-north1-a | |
- name: Deploy to GCP & check status | |
run: | | |
kubectl apply -f ./kubectlapply.yaml --force | |
- name: Notify slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: 'Application: ingress(ipv6) | Environment: staging' | |
fields: commit,author,workflow | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() |