From 82449fef19e2f98ac020d4106821f5708588780b Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 6 Sep 2021 16:13:03 -0500 Subject: only automerge after compiling --- .github/workflows/compile.yml | 26 -------------------------- .github/workflows/test.yml | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/compile.yml (limited to '.github') diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml deleted file mode 100644 index 1e7032b..0000000 --- a/.github/workflows/compile.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - build-push: - runs-on: ubuntu-latest - name: Compile Typescript - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16.0.0' - - run: npm install - - name: Compile Typescript - uses: FuLagann/tsc-build-push@v1 - with: - user-name: "mat-1" - user-email: "github@matdoes.dev" - message: "Compiled TS into JS" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed1fc94..214ddf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ on: [ push, pull_request ] jobs: - build: + test: runs-on: ubuntu-latest name: Run tests steps: @@ -15,8 +15,28 @@ jobs: - name: Run tests run: npm test + build: + runs-on: ubuntu-latest + name: Compile Typescript + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16.0.0' + - run: npm install + - name: Compile Typescript + uses: FuLagann/tsc-build-push@v1 + with: + user-name: "mat-1" + user-email: "github@matdoes.dev" + message: "Compiled TS into JS" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + automerge: - needs: build + needs: [ build, test ] runs-on: ubuntu-latest steps: - uses: fastify/github-action-merge-dependabot@v2.1.1 -- cgit