From 907d6539d3286dc4731a4d681cfd3739b3bacd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Fri, 8 Nov 2024 12:09:52 +0100 Subject: [PATCH] gh: Move base branch to use env variable --- .github/workflows/main.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c1e5b0ee0223..657031c5787f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 - <