Skip to content

Commit

Permalink
Merge branch 'lukas/gh/fix-insecure-workflow' into maint
Browse files Browse the repository at this point in the history
* lukas/gh/fix-insecure-workflow:
  gh: Move base branch to use env variable
  • Loading branch information
garazdawi committed Nov 13, 2024
2 parents 12d2db6 + 907d653 commit 1f800db
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 @@ -412,12 +412,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 1f800db

Please sign in to comment.