Increase memory and cpu #21
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: CD | |
on: | |
pull_request: | |
branches: | |
- master | |
types: [closed] | |
push: | |
branches-ignore: | |
- master | |
jobs: | |
publish-acr: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: fintlabsacr.azurecr.io/${{ github.event.repository.name }} | |
tags: | | |
type=ref,event=branch,suffix=-{{sha}} | |
type=ref,event=pr,suffix=-{{sha}} | |
type=sha,prefix={{date 'YYYY-MM-DD-'}},enable={{is_default_branch}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Login to ACR | |
uses: Azure/docker-login@v1 | |
if: github.actor != 'dependabot[bot]' | |
with: | |
login-server: fintlabsacr.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: ${{ github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy-beta: | |
runs-on: ubuntu-latest | |
needs: publish-acr | |
environment: beta | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get repo name | |
id: get_repo | |
run: echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT | |
- name: Set the target to beta cluster. | |
uses: azure/aks-set-context@v1 | |
with: | |
creds: '${{ secrets.AKS_BETA_FINT_GITHUB }}' | |
cluster-name: ${{ vars.BETA_CLUSTER_NAME }} | |
resource-group: ${{ vars.BETA_CLUSTER_RESOURCE_GROUP }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: fintlabsacr.azurecr.io/${{ github.event.repository.name }} | |
tags: | | |
type=ref,event=branch,suffix=-{{sha}} | |
type=ref,event=pr,suffix=-{{sha}} | |
type=sha,prefix={{date 'YYYY-MM-DD-'}},enable={{is_default_branch}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Deploy to beta | |
uses: azure/k8s-deploy@v3.1 | |
with: | |
manifests: | | |
k8s/beta.yaml | |
images: | | |
${{ steps.meta.outputs.tags }} | |
namespace: default | |
action: deploy | |
strategy: basic | |
pull-images: false |