Skip to content

Workflow file for this run

name: Update .env with GitHub Token
on:
push:
tags:
- 'v*.*.*'
jobs:
update-env:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update .env file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "GITHUB_TOKEN=$GITHUB_TOKEN" >> .env
echo "GitHub Token added to .env file successfully"
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .env
git commit -m "Update .env with new GitHub Token" || echo "No changes to commit"
git push