From befbe3768ca1232b67bc76656720a0fc0ec9d38b Mon Sep 17 00:00:00 2001 From: Eldwan Brianne Date: Sun, 4 Apr 2021 13:07:25 +0200 Subject: [PATCH] Updating workflows --- .github/workflows/{master.yml => ci.yml} | 34 +++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) rename .github/workflows/{master.yml => ci.yml} (77%) diff --git a/.github/workflows/master.yml b/.github/workflows/ci.yml similarity index 77% rename from .github/workflows/master.yml rename to .github/workflows/ci.yml index dd3f089..7a06167 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/ci.yml @@ -6,11 +6,34 @@ on: - 'master' pull_request: branches: - - 'master' + - '*' jobs: + changes: + runs-on: ubuntu-latest + outputs: + go: ${{ steps.filter.outputs.go }} + charts: ${{ steps.filter.outputs.charts }} + steps: + - name: Checkout + uses: actions/checkout@v2 + + - uses: dorny/paths-filter@v2 + id: filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + filters: | + go: + - '**/*.go' + - 'go.mod' + - 'go.sum' + test: runs-on: ubuntu-latest + needs: changes + if: | + (needs.changes.outputs.go == 'true') + steps: - name: Checkout uses: actions/checkout@v2 @@ -27,8 +50,9 @@ jobs: build-docker: runs-on: ubuntu-latest - needs: test - + needs: [changes,test] + if: | + (needs.changes.outputs.go == 'true') steps: - name: Checkout uses: actions/checkout@v2 @@ -57,7 +81,9 @@ jobs: build: runs-on: ubuntu-latest - needs: test + needs: [changes,test] + if: | + (needs.changes.outputs.go == 'true') strategy: matrix: include: