Skip to content

Commit

Permalink
fix(.github): avoid OCI repo validation before its creation
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr authored and poiana committed Jan 17, 2025
1 parent b59b03a commit 515d40a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/registry.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Validate registry.yaml
name: Check registry.yaml
on:
pull_request:
branches: [ main ]
branches: [main]
paths:
- 'registry.yaml'
- "registry.yaml"
push:
branches: [ main ]
branches: [main]
paths:
- 'registry.yaml'
- "registry.yaml"
workflow_dispatch:

# Checks if any concurrent jobs under the same pull request or branch are being executed
Expand All @@ -16,8 +16,8 @@ concurrency:
cancel-in-progress: true

jobs:
validate-registry:
name: validate-registry
check-registry:
name: check-registry
runs-on: ubuntu-22.04
steps:
- name: Checkout ⤵️
Expand All @@ -28,15 +28,16 @@ jobs:
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: '1.21'
go-version: "1.21"
check-latest: true

- name: Build registry artifact tool
working-directory: build/registry
run: make

- name: Validate registry.yaml
# Formal validation only.
# When a new plugin is added and not yet released,
# its OCI repo has not been created yet, so we can't validate it.
- name: Verify the correctness of registry.yaml
working-directory: build/registry
run: |
./bin/registry validate-registry \
../../registry.yaml \
run: ./bin/registry check ../../registry.yaml

0 comments on commit 515d40a

Please sign in to comment.