Skip to content

Commit

Permalink
branch_name => branch_meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Feb 12, 2024
1 parent 697bf41 commit 10aefd0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,31 @@ jobs:
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
labels: ${{ steps.docker_meta_img.outputs.labels }}

branch_name:
branch_meta:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
branch: ${{ steps.extract_branch_meta.outputs.branch }}
sha: ${{ steps.extract_branch_meta.outputs.sha }}
steps:
- name: Extract branch name
- name: Extract branch meta
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch
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:
- build_and_push
- branch_name
- branch_meta
uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/deploy.yml@bc-6130
with:
branch: ${{ needs.branch_name.outputs.branch }}
branch: ${{ needs.branch_meta.outputs.branch }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
DEV_VAULT_BRB: ${{ secrets.DEV_VAULT_BRB }}
Expand All @@ -98,7 +106,6 @@ jobs:
trivy-vulnerability-scanning:
needs:
- build_and_push
- branch_name
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down

0 comments on commit 10aefd0

Please sign in to comment.