Skip to content

Commit

Permalink
gh: Move base branch to use env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
garazdawi committed Nov 13, 2024
1 parent 44ffe88 commit 907d653
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,12 @@ jobs:

## Build all the documentation
- name: Build documentation
env:
BASE_URL: ${{ github.event_name == 'pull_request' &&
format('{0}/blob/{1}/',github.event.pull_request.head.repo.full_name,github.event.pull_request.head.ref) ||
format('{0}/blob/{1}/',github.repository,github.ref_name)
}}
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE_URL="${{ github.event.pull_request.head.repo.full_name }}/blob/${{ github.event.pull_request.head.ref }}/"
else
BASE_URL="${{ github.repository }}/blob/${{ github.ref_name }}/"
fi
docker build --build-arg BASE_URL="$BASE_URL" -t otp - <<EOF
FROM otp
ENV BASE_URL=$BASE_URL
Expand Down

0 comments on commit 907d653

Please sign in to comment.