feat: create git repo #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'postman' | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: [ '*' ] # All branches for direct commits | |
| workflow_dispatch: # Manual trigger | |
| jobs: | |
| postman: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set npm token | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "@linode:registry=https://npm.pkg.github.com/linode" > .npmrc | |
| echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | |
| echo '::set-output name=diff::1' | |
| - name: Install Node | |
| run: | | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| nvm install | |
| nvm use | |
| node -v | |
| npm install | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: linode/apl-core | |
| path: apl-core | |
| - name: Create Git repo | |
| run: | | |
| readonly env_dir="$HOME/workspace/linode/values-ofld1" | |
| readonly apl_core_test_fixtures="$HOME/work/apl-api/apl-api/apl-core" | |
| mkdir -p "$(dirname $env_dir)" | |
| cp -R $apl_core_test_fixtures $env_dir | |
| cd $env_dir | |
| git init | |
| git checkout -b main | |
| git add . | |
| git commit -a -m 'init' | |
| # Mark this repo as bare so the local_env_dir can push to env_dir repo | |
| git config --bool core.bare true | |
| echo "The values bare repo has been successfully set up" | |
| - name: Start core server | |
| run: | | |
| cd apl-core | |
| npm install | |
| npm run server > /dev/null 2>&1 & | |
| - name: Start api | |
| run: | | |
| npm install | |
| cp .env.sample .env | |
| npm run dev |