diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 359e10a..d800d23 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,12 +13,32 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + check-paths: + runs-on: ubuntu-latest + outputs: + server: ${{ steps.filter.outputs.server }} + chart: ${{ steps.filter.outputs.chart }} + cr: ${{ steps.filter.outputs.cr }} + steps: + - uses: actions/checkout@v4 + - name: Filter paths + id: filter + uses: dorny/paths-filter@v3 + with: + filters: | + server: + - 'server/**' + chart: + - 'chart/**' + cr: + - 'collect-currency/**' + build-and-push-server: + if: ${{ needs.check-paths.outputs.server == 'true' }} runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -50,11 +70,11 @@ jobs: platforms: linux/amd64,linux/arm64 build-and-push-chart: + if: ${{ needs.check-paths.outputs.chart == 'true' }} runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -85,13 +105,12 @@ jobs: labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 - - build-and-push-CR: + build-and-push-cr: + if: ${{ needs.check-paths.outputs.cr == 'true' }} runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -120,4 +139,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 \ No newline at end of file + platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2cd9840..fe97368 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,13 +1,30 @@ -name: Deploy docs +name: Deploy docs + on: push: branches: - - master - main + permissions: contents: write + jobs: + check-paths: + runs-on: ubuntu-latest + outputs: + docs: ${{ steps.filter.outputs.docs }} + steps: + - uses: actions/checkout@v4 + - name: Filter paths + id: filter + uses: dorny/paths-filter@v3 + with: + filters: | + docs: + - 'docs/**' + deploy: + if: ${{ needs.check-paths.outputs.docs == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,12 +35,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v4 with: key: mkdocs-material-${{ env.cache_id }} path: .cache restore-keys: | mkdocs-material- - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force \ No newline at end of file + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force