From c201d844573f6156dd38814fa56f2bf841bfc7d9 Mon Sep 17 00:00:00 2001 From: Timo Notheisen <65653426+tnotheis@users.noreply.github.com> Date: Fri, 17 May 2024 15:28:51 +0200 Subject: [PATCH] Publish piepline for database migrator fails due to lack of permissions (#658) * fix: add docker login * fix: add service account for databasemigrator --- .github/workflows/publish.yml | 6 ++++++ helm/templates/databasemigrator/job.yaml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c742852553..a558b4365b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -141,6 +141,12 @@ jobs: uses: actions/checkout@v4 - name: Install script dependencies run: npm install --prefix ./.ci + - name: Docker Login + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Log in to Docker Hub for accessing the cloud builder uses: docker/login-action@v3 with: diff --git a/helm/templates/databasemigrator/job.yaml b/helm/templates/databasemigrator/job.yaml index cb9295a99a..0366f8bcbf 100644 --- a/helm/templates/databasemigrator/job.yaml +++ b/helm/templates/databasemigrator/job.yaml @@ -19,6 +19,9 @@ spec: labels: app: {{ .Values.databasemigrator.name }} spec: + {{- with .Values.global.serviceAccount.name}} + serviceAccountName: {{ . }} + {{- end }} restartPolicy: Never {{- with .Values.databasemigrator.podSecurityContext }} securityContext: