ci: fix building for dependabot
This commit is contained in:
parent
78b4b61882
commit
6076ae2f9e
|
@ -8,10 +8,10 @@ variables:
|
|||
POSTGRES_DB: authentik
|
||||
POSTGRES_USER: authentik
|
||||
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], '/', '-') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
|
||||
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: $(System.PullRequest.SourceBranch)
|
||||
|
||||
stages:
|
||||
- stage: Lint
|
||||
|
@ -374,11 +374,12 @@ stages:
|
|||
targetType: 'inline'
|
||||
script: |
|
||||
set -x
|
||||
echo '##vso[task.setvariable variable=branchName]$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
branchName=$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
echo '##vso[task.setvariable variable=branchName]$branchName
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
containerRegistry: 'dockerhub'
|
||||
repository: 'beryju/authentik'
|
||||
command: 'buildAndPush'
|
||||
Dockerfile: 'Dockerfile'
|
||||
tags: "gh-${{ variables.branchName }}"
|
||||
tags: "gh-$(branchName)"
|
||||
|
|
|
@ -2,10 +2,10 @@ trigger:
|
|||
- master
|
||||
|
||||
variables:
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], '/', '-') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
|
||||
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: $(System.PullRequest.SourceBranch)
|
||||
|
||||
stages:
|
||||
- stage: generate
|
||||
|
@ -94,7 +94,8 @@ stages:
|
|||
targetType: 'inline'
|
||||
script: |
|
||||
set -x
|
||||
echo '##vso[task.setvariable variable=branchName]$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
branchName=$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
echo '##vso[task.setvariable variable=branchName]$branchName
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
containerRegistry: 'dockerhub'
|
||||
|
@ -102,4 +103,4 @@ stages:
|
|||
command: 'buildAndPush'
|
||||
Dockerfile: 'outpost/proxy.Dockerfile'
|
||||
buildContext: 'outpost/'
|
||||
tags: "gh-${{ variables.branchName }}"
|
||||
tags: "gh-$(branchName)"
|
||||
|
|
|
@ -2,10 +2,10 @@ trigger:
|
|||
- master
|
||||
|
||||
variables:
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], '/', '-') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
|
||||
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
|
||||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
|
||||
branchName: $(System.PullRequest.SourceBranch)
|
||||
|
||||
stages:
|
||||
- stage: lint
|
||||
|
@ -74,12 +74,13 @@ stages:
|
|||
targetType: 'inline'
|
||||
script: |
|
||||
set -x
|
||||
echo '##vso[task.setvariable variable=branchName]$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
branchName=$(echo "$(System.PullRequest.SourceBranch)" | sed "s/\//-/g")'
|
||||
echo '##vso[task.setvariable variable=branchName]$branchName
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
containerRegistry: 'dockerhub'
|
||||
repository: 'beryju/authentik-static'
|
||||
command: 'buildAndPush'
|
||||
Dockerfile: 'web/Dockerfile'
|
||||
tags: "gh-${{ variables.branchName }}"
|
||||
tags: "gh-$(branchName)"
|
||||
buildContext: 'web/'
|
||||
|
|
Reference in a new issue