chore(deps): update npm non-major dependencies (#13779) #18
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 Repositories | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/deploy-repositories.yaml' | |
- '.github/workflows/template-docker-push.yaml' | |
- '.github/workflows/template-flux-config-push.yaml' | |
- '.github/workflows/template-helm-push.yaml' | |
- '.github/workflows/template-short-sha.yaml' | |
- 'gitea/**' | |
- 'charts/altinn-repositories/**' | |
- 'charts/altinn-repositories-config/**' | |
workflow_dispatch: | |
inputs: | |
environments: | |
description: 'Environments to deploy to. Multiple environments can be specified by separating them with a comma.' | |
required: false | |
default: 'dev' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
get-short-sha: | |
uses: ./.github/workflows/template-short-sha.yaml | |
construct-environments-array: | |
uses: ./.github/workflows/template-construct-environments.yaml | |
with: | |
environments: ${{ github.event.inputs.environments || 'dev,staging,prod' }} | |
determine-tag: | |
needs: get-short-sha | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.determine-tag.outputs.tag }} | |
steps: | |
- name: Determine tag | |
id: determine-tag | |
run: | | |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then | |
echo "tag=${{ needs.get-short-sha.outputs.short-sha }}" >> $GITHUB_OUTPUT | |
else | |
sanitized_branch_name=$(echo "${{ github.ref_name }}" | tr -d '()' | tr '/' '-') | |
echo "tag=${sanitized_branch_name}-${{ needs.get-short-sha.outputs.short-sha }}" >> $GITHUB_OUTPUT | |
fi | |
docker-build-push: | |
needs: [get-short-sha, determine-tag] | |
uses: ./.github/workflows/template-docker-push.yaml | |
with: | |
tags: ${{ needs.determine-tag.outputs.tag }},latest | |
registry-name: altinntjenestercontainerregistry.azurecr.io | |
repository-name: altinn-repositories | |
context: gitea | |
dockerfile: gitea/Dockerfile | |
environment: dev # dev environment has push access and doesn't require review | |
secrets: | |
client-id: ${{ secrets.AZURE_CLIENT_ID_FC }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID_FC }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FC }} | |
helm-push: | |
needs: [get-short-sha, determine-tag] | |
uses: ./.github/workflows/template-helm-push.yaml | |
with: | |
tag: 0.1.0+${{ needs.determine-tag.outputs.tag }} # Helm version needs to be valid semantic version | |
chart-name: altinn-repositories | |
registry-name: altinntjenestercontainerregistry.azurecr.io | |
environment: dev # dev environment has push access and doesn't require review | |
secrets: | |
client-id: ${{ secrets.AZURE_CLIENT_ID_FC }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID_FC }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FC }} | |
flux-config-push: | |
needs: [construct-environments-array, get-short-sha, determine-tag, docker-build-push, helm-push] | |
strategy: | |
matrix: | |
environment: ${{ fromJSON(needs.construct-environments-array.outputs.environmentsjson) }} | |
uses: ./.github/workflows/template-flux-config-push.yaml | |
with: | |
tag: ${{ needs.determine-tag.outputs.tag }} | |
registry-name: altinntjenestercontainerregistry.azurecr.io | |
environment: ${{ matrix.environment }} | |
config-chart-name: altinn-repositories-config | |
artifact-name: altinn-repositories | |
helm-set-arguments: environmentName=${{ matrix.environment }},chartVersion=0.1.0+${{ needs.determine-tag.outputs.tag }},imageTag=${{ needs.determine-tag.outputs.tag }} | |
secrets: | |
client-id: ${{ secrets.AZURE_CLIENT_ID_FC }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID_FC }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FC }} |