Fixup gh actions test workflow remove double step #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update instance | |
on: | |
push: | |
branches: | |
- main | |
concurrency: serialize | |
env: | |
TEMPLATE: cookiecutter-hypermodern-python | |
PROJECT: cookiecutter-hypermodern-python-instance | |
jobs: | |
instance: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out ${{ env.TEMPLATE }} | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.TEMPLATE }} | |
- name: Check out ${{ env.PROJECT }} | |
uses: actions/checkout@v4 | |
with: | |
repository: "bosd/${{ env.PROJECT }}" | |
path: ${{ env.PROJECT }} | |
token: ${{ secrets.X_GITHUB_TOKEN }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
working-directory: ${{ env.TEMPLATE }} | |
- name: Install dependencies | |
run: uv pip install | |
working-directory: ${{ env.TEMPLATE }} | |
- name: Install cutty | |
working-directory: ${{ env.TEMPLATE }} | |
run: | | |
uv run pip install --constraint=.github/workflows/constraints.txt cutty # Use uv run | |
uv run cutty --version # Use uv run | |
- name: Import commit into ${{ env.PROJECT }} | |
run: | | |
uv run cutty import --non-interactive --cwd=${PROJECT} --revision=${GITHUB_SHA} # Use uv run | |
working-directory: ${{ env.TEMPLATE }} | |
env: | |
GIT_AUTHOR_NAME: "GitHub Action" | |
GIT_AUTHOR_EMAIL: "[email protected]" | |
- name: Push to bosd/${{ env.PROJECT }} | |
run: | | |
if ! git -C ${TEMPLATE} show --no-patch --format=%B ${GITHUB_SHA} | grep -q ^Retrocookie-Original-Commit: | |
then | |
git -C $PROJECT push https://$GITHUB_ACTOR:[email protected]/bosd/$PROJECT.git HEAD:main | |
fi |