0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-20 22:52:51 -05:00

fix(workflow): add fetch depth, removed running at release (#873)

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
This commit is contained in:
Catalin Hofnar 2022-10-17 20:41:53 +03:00 committed by GitHub
parent 14954596cb
commit 794a4aabd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,15 @@ jobs:
ARCH: ${{ matrix.arch }}
- name: Upload code coverage
uses: codecov/codecov-action@v3
- name: Generate GraphQL Introspection JSON on Release
if: github.event_name == 'release' && github.event.action == 'published' && matrix.os == 'linux' && matrix.arch == 'amd64'
run: |
bin/zot-linux-amd64 serve examples/config-search.json &
sleep 10
curl -X POST -H "Content-Type: application/json" -d @.pkg/debug/githubWorkflows/introspection-query.json http://localhost:5000/v2/_zot/ext/search | jq > bin/zot-gql-introspection-result.json
pkill zot
- if: github.event_name == 'release' && github.event.action == 'published'
name: Publish artifacts on releases
uses: svenstaro/upload-release-action@v2
@ -106,31 +115,6 @@ jobs:
overwrite: true
file_glob: true
- name: Check if GraphQL Schema Changed
if: matrix.os == 'linux' && matrix.arch == 'amd64'
id: changed-files-specific
uses: tj-actions/changed-files@v32
with:
files: |
pkg/extensions/search/schema.graphql
- name: Generate GraphQL Introspection JSON
if: steps.changed-files-specific.outputs.any_changed == 'true' && matrix.os == 'linux' && matrix.arch == 'amd64'
run: |
echo "Schema has changed"
bin/zot-linux-amd64 serve examples/config-search.json &
sleep 10
mkdir introspection
curl -X POST -H "Content-Type: application/json" -d @.pkg/debug/githubWorkflows/introspection-query.json http://localhost:5000/v2/_zot/ext/search | jq > introspection/introspection-result.json
pkill zot
- name: Upload GraphQL Introspection JSON
uses: actions/upload-artifact@v3
if: steps.changed-files-specific.outputs.any_changed == 'true' && matrix.os == 'linux' && matrix.arch == 'amd64'
with:
name: introspection-result
path: introspection/introspection-result.json
push-image:
if: github.event_name == 'release' && github.event.action== 'published'
name: Push OCI images to GitHub Packages