diff --git a/.github/workflows/build_and_upload_on_push_to_dev.yaml b/.github/workflows/build_and_upload_on_push_to_dev.yaml index 5c93f8636..66e209915 100644 --- a/.github/workflows/build_and_upload_on_push_to_dev.yaml +++ b/.github/workflows/build_and_upload_on_push_to_dev.yaml @@ -16,6 +16,7 @@ on: branches: - dev - release + - devops/FAIRSPC-23_deployment jobs: # A job to generate one shared unique version tag per build cycle for all built artifacts @@ -194,7 +195,7 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.DOCKER_REGISTRY }} - username: ${{ github.actor }} + username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker diff --git a/.github/workflows/deploy_helm_chart.yaml b/.github/workflows/deploy_helm_chart.yaml index 48b53944b..fb7527812 100644 --- a/.github/workflows/deploy_helm_chart.yaml +++ b/.github/workflows/deploy_helm_chart.yaml @@ -1,6 +1,9 @@ name: Deploy Helm Chart to FNS GKE on: + push: + branches: + - devops/FAIRSPC-23_deployment workflow_dispatch: inputs: name: @@ -47,9 +50,6 @@ jobs: - name: Define Helm Chart version (taken from input or latest snapshot) run: | VERSION=$(cat ./VERSION)-SNAPSHOT - if [ -n "${{ github.event.inputs.version }}" ]; then - VERSION=${{ github.event.inputs.version }} - fi echo "Helm charts version to be deployed: $VERSION" echo "VERSION=$VERSION" >> $GITHUB_ENV diff --git a/.github/workflows/package_and_push_helm_chart.yaml b/.github/workflows/package_and_push_helm_chart.yaml index eab06a9de..0ecac041b 100644 --- a/.github/workflows/package_and_push_helm_chart.yaml +++ b/.github/workflows/package_and_push_helm_chart.yaml @@ -5,6 +5,7 @@ on: branches: - dev - release + - devops/FAIRSPC-23_deployment workflow_dispatch: inputs: name: @@ -32,14 +33,11 @@ jobs: - name: Login with Helm run: | - echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.HELM_REGISTRY }} --username ${{ github.repository_owner }} --password-stdin + echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.HELM_REGISTRY }} --username ${{ github.actor }} --password-stdin - name: Prepare version run: | VERSION=$(cat ./VERSION) - if [[ ${{ github.event.inputs.release_type }} = "SNAPSHOT" ]] || [[ $BRANCH = "dev" ]]; then - VERSION=$VERSION-SNAPSHOT - fi echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Push Helm chart to repository @@ -48,7 +46,3 @@ jobs: helm package "charts/fairspace" --version ${{ env.VERSION }} helm push "fairspace-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" echo "Pushed package to repository" - - - name: Clean up - run: | - rm -rf "fairspace*.tgz"