Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/scheduled-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ jobs:
if: github.repository == 'CustomResourceDefinition/catalog' || github.event_name == 'workflow_dispatch'
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v6
with:
ssh-key: ${{ secrets.DEPLOY_KEY_SCHEDULED_JOBS }}

- uses: actions/setup-go@v6
with:
go-version-file: go.mod

- uses: actions/cache@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Optionally remove paths
if: github.event_name == 'workflow_dispatch' && github.event.inputs.reset != ''
run: |
Expand All @@ -46,21 +58,13 @@ jobs:
cd -

- run: make update
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}

- uses: actions/checkout@v6
with:
repository: datreeio/CRDs-catalog
path: build/remote/datreeio

- run: make comparison
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}

- uses: EndBug/add-and-commit@v9
name: Publish changes
Expand All @@ -78,7 +82,7 @@ jobs:
needs:
- update-schemas
- sync-tags
if: failure() && github.event_name != 'workflow_dispatch'
if: failure() && github.repository == 'CustomResourceDefinition/catalog' && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch'
permissions:
contents: read
issues: write
Expand All @@ -97,6 +101,7 @@ jobs:
name: Synchronize tags with kubernetes
runs-on: ubuntu-latest
needs: update-schemas
if: github.repository == 'CustomResourceDefinition/catalog' && github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version-file: go.mod

- uses: actions/cache@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- run: make test
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}
2 changes: 1 addition & 1 deletion make.d/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Available targets:
clean Removes temporarily generated files and builds and removes local container images
comparison Updates COMPARISON.md based on the /schema contents
help Displays this help
schema-check Verifies all schema files against jsonschema schema file - this takes a very long time
schema-check Verifies all schema files against jsonschema schema file - this takes a very long time
tags Synchronize semantic version tags from kubernetes into this repository
test Runs the entire test suite
update Updates the /schema contents