ci: improve restore after switching to stable

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-20 22:47:06 +01:00
parent 92b4244e81
commit 4afef46cb8
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@ jobs:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: checkout stable
id: stable
run: |
# Save current branch
current=$(git branch --show)
echo ##[set-output name=originalBranch]$current
# Copy current, latest config to local
cp authentik/lib/default.yml local.env.yml
cp -R .github ..
@ -108,7 +112,7 @@ jobs:
set -x
git fetch
git reset --hard HEAD
git checkout $GITHUB_HEAD_REF
git checkout ${{ steps.stable.outputs.originalBranch }}
pipenv sync --dev
- name: prepare
env: