Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
talgat-abdraimov committed Apr 17, 2024
1 parent 6ba7e7b commit 1fe0434
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: Repo Created

on: push
on:
push:
branches:
- main

permissions:
contents: write

jobs:
check-initial-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: check if initial commit
id: check
run: |
Expand All @@ -18,10 +25,15 @@ jobs:
echo "initial_commit=false" >> $GITHUB_OUTPUT
fi
- name: Change README
if: steps.check.outputs.initial_commit == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: >-
${{ !github.event.repository.is_template
&& steps.check.outputs.initial_commit == 'true' }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
echo "Repo Created" > README.md
git add README.md
git commit -m "Added README.md"
git push

0 comments on commit 1fe0434

Please sign in to comment.