diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-11-02 16:39:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-02 16:39:51 +0100 |
commit | 1ead44722cd91dbb7b8374127b0f07b5d15774c9 (patch) | |
tree | 6cebbc1d103f3c760fbe3842af7a6e6d7e78cfad /.github/workflows | |
parent | 818dc27fa1656ef7ee49c982ec6ead2aa834efc8 (diff) |
fix(cd): proper cd (#143)
* fix(cd): properly end the yml
* fix(cd): don't check on main
* fix(cd): only test build if ts files are changed
* fix(cd): proper ubuntu
* fix(cd): use checkout
* fix(cd): add filter to cd
* fix(cd): ubuntu latest and better excl
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/cd.yml | 23 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 23 |
2 files changed, 40 insertions, 6 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6416ae4..aded4aa 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,9 +9,26 @@ defaults: run: shell: 'bash' jobs: - lint-test-build: - name: '[build]' + changes: runs-on: 'ubuntu-latest' + outputs: + ts: ${{ steps.filter.outputs.ts }} + steps: + - uses: actions/checkout@v2 + - name: '[check if build necessary]' + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + ts: + - '*.ts' + - '*.tsx' + - '*.json' + build-deploy: + name: '[cd|build-deploy]' + runs-on: 'ubuntu-latest' + needs: changes + if: ${{ needs.changes.outputs.ts == 'true' }} steps: - name: '[checkout] ${{ github.repository }} project' uses: 'actions/checkout@v2' @@ -42,4 +59,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} ... -# End of ci.yml +# End of cd.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5a928..eb6c347 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,15 +4,32 @@ name: 'ci' on: push: - branches-ignore: - -[main] + branches: + - '!main' defaults: run: shell: 'bash' jobs: + changes: + runs-on: 'ubuntu-latest' + outputs: + ts: ${{ steps.filter.outputs.ts }} + steps: + - uses: actions/checkout@v2 + - name: '[check if build necessary]' + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + ts: + - '*.ts' + - '*.tsx' + - '*.json' lint-test-build: name: '[ci|lint-test-build]' - runs-on: 'ubuntu-18.04' + runs-on: 'ubuntu-latest' + needs: changes + if: ${{ needs.changes.outputs.ts == 'true' }} steps: - name: '[checkout] ${{ github.repository }} project' uses: 'actions/checkout@v2' |