Skip to content

Check if pr check is needed instead of pr event #395

Check if pr check is needed instead of pr event

Check if pr check is needed instead of pr event #395

Workflow file for this run

name: Tests
on:
push:
branches: [main]
jobs:
Bot:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Node Modules
run: npm install
- name: TypeScript Validation
run: npm run build
API:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Elixir
run: |
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i erlang-solutions_2.0_all.deb
rm erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt-get install -y esl-erlang elixir
- name: Install Hex Packages
run: |
cd api
mix local.hex --force
mix deps.get
mix local.rebar --force
- name: Compile API
run: |
touch .env
cd api
mix compile
Push:
if: needs.pr-check.outputs.number != 'null'
needs: [Bot, API]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "tests-passed"
- name: Push to tests-passed
run: |
git config user.name github-actions
git config user.email [email protected]
git merge origin/main
git push