diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f8d9c6536..5cfcc1be2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,7 +42,8 @@ jobs: name: Build runs-on: ubuntu-latest needs: changes - if: ${{ needs.changes.outputs.go == 'true' }} + if: | + (needs.changes.outputs.go == 'true') steps: @@ -100,7 +101,8 @@ jobs: runs-on: ubuntu-latest needs: - changes - if: ${{ needs.changes.outputs.charts == 'true' }} + if: | + (needs.changes.outputs.charts == 'true') steps: @@ -137,7 +139,9 @@ jobs: needs: - changes - build - if: ${{ needs.changes.outputs.go == 'true' }} + if: | + (needs.changes.outputs.go == 'true') + strategy: matrix: k8s: [v1.17.5, v1.18.8, v1.19.0] diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 000000000..4d90d6b64 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,48 @@ +name: Documentation + +on: + push: + branches: + - master + +jobs: + + changes: + runs-on: ubuntu-latest + if: | + (github.repository == 'kubernetes/ingress-nginx') + outputs: + docs: ${{ steps.filter.outputs.docs }} + charts: ${{ steps.filter.outputs.charts }} + + steps: + + - name: Checkout + uses: actions/checkout@v1 + + - uses: dorny/paths-filter@v2.2.0 + id: filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + filters: | + docs: + - 'docs/**/*' + + docs: + name: Update + runs-on: ubuntu-latest + needs: + - changes + if: | + (github.repository == 'kubernetes/ingress-nginx') && + (needs.changes.outputs.docs == 'true') + + steps: + + - name: Checkout master + uses: actions/checkout@v1 + + - name: Deploy + uses: ./.github/actions/mkdocs + env: + PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} diff --git a/.github/workflows/main.yaml b/.github/workflows/helm.yaml similarity index 66% rename from .github/workflows/main.yaml rename to .github/workflows/helm.yaml index 5e95790be..f753a2992 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/helm.yaml @@ -1,4 +1,4 @@ -name: Documentation and Helm chart +name: Helm on: push: @@ -9,9 +9,12 @@ jobs: changes: runs-on: ubuntu-latest + if: | + (github.repository == 'kubernetes/ingress-nginx') outputs: docs: ${{ steps.filter.outputs.docs }} charts: ${{ steps.filter.outputs.charts }} + steps: - name: Checkout @@ -22,34 +25,17 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} filters: | - docs: - - 'docs/**/*' charts: - 'charts/ingress-nginx/Chart.yaml' - docs: - name: Update Documentation - runs-on: ubuntu-latest - needs: - - changes - if: ${{ needs.changes.outputs.docs == 'true' }} - - steps: - - - name: Checkout master - uses: actions/checkout@v1 - - - name: Deploy docs - uses: ./.github/actions/mkdocs - env: - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - chart: name: Release Chart runs-on: ubuntu-latest needs: - changes - if: ${{ needs.changes.outputs.charts == 'true' }} + if: | + (github.repository == 'kubernetes/ingress-nginx') && + (needs.changes.outputs.charts == 'true') steps: