Skip to content

Add legacy package

Add legacy package #75

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:
get_current_step:
name: Check current step number
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: get_step
run: |
if [ -f ./.github/script/STEP ]; then
echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT
else
echo "current_step=0" >> $GITHUB_OUTPUT
fi
outputs:
current_step: ${{ steps.get_step.outputs.current_step }}
save_repo_info:
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