Skip to content

Commit

Permalink
Save Repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
usulpro committed May 30, 2024
1 parent 6dfc4f1 commit 4b3d909
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/new-repo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Save Repository ID to .env.initial
name: Save Repository Info to .env.initial

on:
workflow_dispatch:
Expand Down Expand Up @@ -27,8 +27,8 @@ jobs:
outputs:
current_step: ${{ steps.get_step.outputs.current_step }}

save_repo_id:
name: Save Repository ID
save_repo_info:
name: Save Repository Info
needs: get_current_step
if: >-
${{ !github.event.repository.is_template
Expand All @@ -40,10 +40,12 @@ jobs:
with:
ref: main

- name: Print and Save Repository ID
- 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
- name: Commit and Push .env.initial
env:
Expand All @@ -52,5 +54,5 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .env.initial
git commit -m "Add repository ID to .env.initial"
git commit -m "Add repository info to .env.initial"
git push origin main

0 comments on commit 4b3d909

Please sign in to comment.