Skip to content

feat: loaded secrets #7

feat: loaded secrets

feat: loaded secrets #7

Workflow file for this run

name: Crawl
on:
push:
branches:
- master
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Create .env file
run: |
echo "NODE_ENV=${{ secrets.NODE_ENV }}" > .env
echo "OPEN_DB_KEY=${{ secrets.OPEN_DB_KEY }}" >> .env
echo "OPEN_DB_IV=${{ secrets.OPEN_DB_IV }}" >> .env
echo "PHPSESSID=${{ secrets.PHPSESSID }}" >> .env
- name: Print .env file content
run: cat .env
- name: Generate random string
id: random_string
run: echo "RANDOM_STRING=$(openssl rand -hex 16)" >> date.txt
- name: Print random string
run: echo "${{ steps.random_string.outputs.RANDOM_STRING }}"
- name: Push to Github
run: |
git add ./db
git config --global user.name "Zain-ul-din"
git config --global user.email "[email protected]"
git commit -m "🤖 Github Action: updated encrypted DB"
git push origin master
# Appendix:
# https://stackoverflow.com/questions/72851548/permission-denied-to-github-actionsbot