actions test
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Successful in 23s
Rename the project from template / rename-project (push) Successful in 16s
CI / tests_linux (ubuntu-latest, 3.9) (push) Successful in 20s
CI / tests_mac (macos-latest, 3.9) (push) Has been cancelled
CI / tests_win (windows-latest, 3.9) (push) Has been cancelled

This commit is contained in:
Simon Diesenreiter 2024-11-09 09:06:45 -08:00
parent 43ff10817d
commit 62e1917a95

View File

@ -6,7 +6,7 @@ permissions: write-all
jobs: jobs:
rename-project: rename-project:
if: ${{ !contains (github.repository, '/python-project-template') }} if: ${{ !contains (gitea.repository, '/Pythonx') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -14,29 +14,32 @@ jobs:
# by default, it uses a depth of 1 # by default, it uses a depth of 1
# this fetches all history so that we can read each commit # this fetches all history so that we can read each commit
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.head_ref }} ref: ${{ gitea.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - run: env
shell: bash shell: bash
# - run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
# shell: bash
- run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV # - run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash # shell: bash
- run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV # - run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
shell: bash # shell: bash
- name: Is this still a template # - name: Is this still a template
id: is_template # id: is_template
run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)" # run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)"
- name: Rename the project # - name: Rename the project
if: steps.is_template.outputs.is_template == 'true' # if: steps.is_template.outputs.is_template == 'true'
run: | # run: |
echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}" # echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}"
.gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}" # .gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
- uses: stefanzweifel/git-auto-commit-action@v4 # - uses: stefanzweifel/git-auto-commit-action@v4
with: # with:
commit_message: "✅ Ready to clone and code." # commit_message: "✅ Ready to clone and code."
# commit_options: '--amend --no-edit' # # commit_options: '--amend --no-edit'
push_options: --force # push_options: --force