Cleanup github actions

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-09-02 19:00:23 -04:00
parent 7e03c13c0c
commit 2217dcf7f1
3 changed files with 62 additions and 24 deletions

View file

@ -42,7 +42,8 @@ jobs:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: changes needs: changes
if: ${{ needs.changes.outputs.go == 'true' }} if: |
(needs.changes.outputs.go == 'true')
steps: steps:
@ -100,7 +101,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- changes - changes
if: ${{ needs.changes.outputs.charts == 'true' }} if: |
(needs.changes.outputs.charts == 'true')
steps: steps:
@ -137,7 +139,9 @@ jobs:
needs: needs:
- changes - changes
- build - build
if: ${{ needs.changes.outputs.go == 'true' }} if: |
(needs.changes.outputs.go == 'true')
strategy: strategy:
matrix: matrix:
k8s: [v1.17.5, v1.18.8, v1.19.0] k8s: [v1.17.5, v1.18.8, v1.19.0]

48
.github/workflows/docs.yaml vendored Normal file
View file

@ -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 }}

View file

@ -1,4 +1,4 @@
name: Documentation and Helm chart name: Helm
on: on:
push: push:
@ -9,9 +9,12 @@ jobs:
changes: changes:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: |
(github.repository == 'kubernetes/ingress-nginx')
outputs: outputs:
docs: ${{ steps.filter.outputs.docs }} docs: ${{ steps.filter.outputs.docs }}
charts: ${{ steps.filter.outputs.charts }} charts: ${{ steps.filter.outputs.charts }}
steps: steps:
- name: Checkout - name: Checkout
@ -22,34 +25,17 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
filters: | filters: |
docs:
- 'docs/**/*'
charts: charts:
- 'charts/ingress-nginx/Chart.yaml' - '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: chart:
name: Release Chart name: Release Chart
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- changes - changes
if: ${{ needs.changes.outputs.charts == 'true' }} if: |
(github.repository == 'kubernetes/ingress-nginx') &&
(needs.changes.outputs.charts == 'true')
steps: steps: