Bump io.spring.dependency-management from 1.1.6 to 1.1.7 #150
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: push | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
outputs: | |
tags: ${{ steps.meta.outputs.tags }} | |
env: | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Limit branch name | |
id: branch | |
run: | | |
BRANCH_NAME=${GITHUB_REF#refs/heads/} | |
echo "shortname=$(echo "$BRANCH_NAME" | cut -c1-40)" >> $GITHUB_OUTPUT | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value=${{ steps.branch.outputs.shortname }}-{{sha}} | |
type=sha,prefix={{date 'YYYY-MM-DD-'}},enable={{is_default_branch}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3.0.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy-to-aks: | |
name: ${{ format('{0}-{1}', matrix.org, matrix.cluster) }} | |
if: github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
needs: build-and-publish | |
strategy: | |
fail-fast: false | |
matrix: | |
org: [ fintlabs-no, ofk-no, tromsfylke-no, bfk-no, afk-no, vlfk-no, rogfk-no, innlandetfylke-no, agderfk-no, mrfylke-no, vestfoldfylke-no ] | |
cluster: [ aks-beta-fint-2021-11-23, aks-api-fint-2022-02-08 ] | |
include: | |
- org: tromsfylke-no | |
deploy-every-branch: true | |
exclude: | |
- cluster: aks-api-fint-2022-02-08 | |
org: fintlabs-no | |
- cluster: aks-beta-fint-2021-11-23 | |
org: mrfylke-no | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get environment | |
id: environment | |
run: | | |
echo "name=$(cut -d\- -f2 <<< ${{ matrix.cluster }})" >> $GITHUB_OUTPUT | |
- name: Bake manifests with Kustomize | |
id: bake | |
uses: azure/k8s-bake@v3 | |
with: | |
renderEngine: 'kustomize' | |
kustomizationPath: 'kustomize/overlays/${{ matrix.org }}/${{ steps.environment.outputs.name }}' | |
- name: Login to Azure | |
uses: azure/login@v2 | |
with: | |
creds: "${{ secrets[format('AKS_{0}_FINT_GITHUB', steps.environment.outputs.name)] }}" | |
- name: Set the target cluster | |
uses: azure/aks-set-context@v4 | |
with: | |
cluster-name: ${{ matrix.cluster }} | |
resource-group: rg-aks-${{ steps.environment.outputs.name }} | |
admin: true | |
- if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && matrix.deploy-every-branch != true | |
run: | | |
{ | |
echo "## Dry run - not a real deploy" | |
echo "To deploy, merge to ${{ github.event.repository.default_branch }}." | |
} >> $GITHUB_STEP_SUMMARY | |
- name: Deploy to Kubernetes | |
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || matrix.deploy-every-branch == true | |
uses: azure/k8s-deploy@v5 | |
with: | |
action: deploy | |
manifests: ${{ steps.bake.outputs.manifestsBundle }} | |
images: ${{ needs.build-and-publish.outputs.tags }} | |
namespace: ${{ matrix.org }} |