Skip to content

Fix flows

Fix flows #22

Workflow file for this run

name: Save Repository Info to .env.initial
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
save_repo_info:

Check failure on line 14 in .github/workflows/new-repo.yml

View workflow run for this annotation

GitHub Actions / Save Repository Info to .env.initial

Invalid workflow file

The workflow is not valid. .github/workflows/new-repo.yml (Line: 14, Col: 3): The workflow must contain at least one job with no dependencies.
name: Save Repository Info
needs: get_current_step
if: >-
${{ !github.event.repository.is_template
&& needs.get_current_step.outputs.current_step == 0 }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- name: Print and Save Repository Info
run: |
echo "Repository ID: ${{ github.event.repository.id }}"
echo "REPO_ID=${{ github.event.repository.id }}" > .env.initial
echo "Repository Name: ${{ github.repository }}"
echo "REPO_NAME=${{ github.repository }}" >> .env.initial
echo "MAX_NUMBER_OF_PROJECTS=7" >> .env.initial
echo "REPO_PROD_BRANCH=main" >> .env.initial
- name: Commit, Push, and Remove GitHub Actions workflows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.event.repository.owner.login }}@users.noreply.github.com"
git add .env.initial
rm -rf .github/workflows
git add .
git commit -m "Add repository info to .env.initial and remove GitHub Actions workflows"
git push origin main