Skip to content

fixed review

fixed review #9

Workflow file for this run

name: Rename the project from template
on: [push]
jobs:
rename-project:
if: ${{ github.repository != 'fifthtry/fpm-template' && github.run_number == 1 }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# this fetches all history so that we can read each commit
fetch-depth: 0
ref: ${{ github.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
shell: bash
- run: |
echo "Using '${{ env.REPOSITORY_NAME }}' and "${{ env.REPOSITORY_OWNER }}" to rename fpm package"
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' FPM.ftd
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "✅ Ready to clone and code."
# commit_options: '--amend --no-edit'
push_options: --force
call-deploy-workflow:
needs: [ rename-project ]
uses: ./.github/workflows/deploy.yml