Skip to content

Commit

Permalink
DBP-350-Add deployment to push releaase on push to branch
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Schiborr committed Nov 9, 2023
1 parent 2751ce4 commit 7fb6db5
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/chart-release-on-push-to-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,38 @@ jobs:
secrets: inherit
with:
chart_name: dbildungs-iam
version_generation: ticket_from_branch_short_hash
version_generation: ticket_from_branch_short_hash

branch_meta:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch_meta.outputs.branch }}
sha: ${{ steps.extract_branch_meta.outputs.sha }}
steps:
- name: Extract branch meta
shell: bash
id: extract_branch_meta
run: |
if [ "${{ github.event_name }}" == 'pull_request' ]; then
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
echo "sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
else
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT
fi
deploy:
needs:
- branch_meta
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@main
with:
branch: ${{ needs.branch_meta.outputs.branch }}
secrets:
DEV_KUBE_CONFIG: ${{ secrets.SPSH_DEV_KUBECONFIG }}

deploy-successful:
needs:
- deploy
runs-on: ubuntu-latest
steps:
- run: echo "deploy was successful"

0 comments on commit 7fb6db5

Please sign in to comment.