ci: improve restore after switching to stable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
92b4244e81
commit
4afef46cb8
6
.github/workflows/ci-main.yml
vendored
6
.github/workflows/ci-main.yml
vendored
|
@ -86,7 +86,11 @@ jobs:
|
||||||
path: ~/.local/share/virtualenvs
|
path: ~/.local/share/virtualenvs
|
||||||
key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
|
key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
|
||||||
- name: checkout stable
|
- name: checkout stable
|
||||||
|
id: stable
|
||||||
run: |
|
run: |
|
||||||
|
# Save current branch
|
||||||
|
current=$(git branch --show)
|
||||||
|
echo ##[set-output name=originalBranch]$current
|
||||||
# Copy current, latest config to local
|
# Copy current, latest config to local
|
||||||
cp authentik/lib/default.yml local.env.yml
|
cp authentik/lib/default.yml local.env.yml
|
||||||
cp -R .github ..
|
cp -R .github ..
|
||||||
|
@ -108,7 +112,7 @@ jobs:
|
||||||
set -x
|
set -x
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
git checkout $GITHUB_HEAD_REF
|
git checkout ${{ steps.stable.outputs.originalBranch }}
|
||||||
pipenv sync --dev
|
pipenv sync --dev
|
||||||
- name: prepare
|
- name: prepare
|
||||||
env:
|
env:
|
||||||
|
|
Reference in a new issue