Skip to content

Commit

Permalink
Added job to extract correct branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
MukuFlash03 committed Oct 1, 2024
1 parent 97d07b1 commit b892faa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,25 @@ jobs:
echo "Default branch: ${{ github.event.repository.default_branch }}"
echo "Github event base ref: ${{ github.event.base_ref }}"
get-branch-name:
runs-on: ubuntu-latest

outputs:
branch_name: ${{ steps.get-branch-name.outputs.branch_name }}

steps:
- name: Remove prefix from branch name
id: get-branch-name
run: |
base_ref=${{ github.event.base_ref }}
echo "Branch name: branch_name=${base_ref#refs/heads/}"
echo "branch_name=${base_ref#refs/heads/}" >> "$GITHUB_OUTPUT"
build:
if: ${{ !contains(github.event.head_commit.author.name, 'Github Actions bot to update .env with latest tags') }}
needs: [get-branch-name]
uses: MukuFlash03/e-mission-server/.github/workflows/reusable_image_build_push.yml@cleanup-cicd
with:
repo: ${{ github.event.repository.name }}
branch: ${{ github.ref_name }}
branch: ${{ needs.get-branch-name.outputs.branch_name }}
secrets: inherit

0 comments on commit b892faa

Please sign in to comment.