From 87257607c915d46990dde96bbccc66a556344948 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Tue, 3 Sep 2024 11:05:40 +0200 Subject: [PATCH] WIP --- .github/workflows/.yamllint | 2 ++ .github/workflows/docker-publish.yml | 4 ++-- .github/workflows/jekyll-feed-to-vespa.yml | 4 ++-- jekyll-build-json/action.yml | 4 ++-- jekyll-build-json/entrypoint.sh | 2 +- jekyll-build-json/vespa_index_generator.rb | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/.yamllint b/.github/workflows/.yamllint index f28a9f8..b7f66a1 100644 --- a/.github/workflows/.yamllint +++ b/.github/workflows/.yamllint @@ -2,6 +2,8 @@ extends: default rules: + document-start: + present: false line-length: disable truthy: check-keys: false diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 32a05e4..50a87c7 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -91,7 +91,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: ${{ matrix.docker-platform }} - provenance: false # Bug: https://github.com/docker/build-push-action/issues/820 + # Disable "provenance" vecause of this bug: https://github.com/docker/build-push-action/issues/820 + provenance: false cache-from: type=gha cache-to: type=gha,mode=max - diff --git a/.github/workflows/jekyll-feed-to-vespa.yml b/.github/workflows/jekyll-feed-to-vespa.yml index 0b179a1..7005923 100644 --- a/.github/workflows/jekyll-feed-to-vespa.yml +++ b/.github/workflows/jekyll-feed-to-vespa.yml @@ -17,14 +17,14 @@ defaults: shell: bash jobs: - lint: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build with Jekyll - uses: vespa-engine/gh-actions/jekyll-build-json@main + uses: vespa-engine/gh-actions/jekyll-build-json@fix-jekyll-build with: log_level: ${{ github.event.inputs.log_level }} diff --git a/jekyll-build-json/action.yml b/jekyll-build-json/action.yml index 51b0d65..3d4095f 100644 --- a/jekyll-build-json/action.yml +++ b/jekyll-build-json/action.yml @@ -16,7 +16,7 @@ inputs: default: ./_config.yml log_level: description: 'Log level for Jekyll build.' - required: false + required: true default: 'info' token: description: 'GitHub token' @@ -24,4 +24,4 @@ inputs: default: ${{ github.token }} runs: using: 'docker' - image: 'docker://ghcr.io/vespa-engine/gh-actions/jekyll-build-json' + image: 'docker://ghcr.io/vespa-engine/gh-actions/jekyll-build-json:pr-14' diff --git a/jekyll-build-json/entrypoint.sh b/jekyll-build-json/entrypoint.sh index 6de16a5..21aefa4 100755 --- a/jekyll-build-json/entrypoint.sh +++ b/jekyll-build-json/entrypoint.sh @@ -17,7 +17,7 @@ JEKYLL_ARGS=("-p" "/opt/jekyll/plugins") export JEKYLL_ENV="production" export JEKYLL_GITHUB_TOKEN="${INPUT_TOKEN}" export JEKYLL_BUILD_REVISION="${GITHUB_SHA}" -export JEKYLL_LOG_LEVEL="${INPUT_LOG_LEVEL}" +export JEKYLL_LOG_LEVEL="${INPUT_LOG_LEVEL:-info}" if [[ "${JEKYLL_LOG_LEVEL}" = "verbose" || "${JEKYLL_LOG_LEVEL}" = "debug" ]]; then JEKYLL_ARGS+=("-V") diff --git a/jekyll-build-json/vespa_index_generator.rb b/jekyll-build-json/vespa_index_generator.rb index ba56850..6f9e26a 100644 --- a/jekyll-build-json/vespa_index_generator.rb +++ b/jekyll-build-json/vespa_index_generator.rb @@ -65,7 +65,7 @@ def generate(site) # File.open(__dir__ + namespace + "_index.json", "w") { |f| f.write(json) } puts "::debug::Writing index file: #{namespace}_index.json" - index_file = PageWithoutAFile.new(@site, __dir__, "", namespace + "_index.json") + index_file = PageWithoutAFile.new(@site, __dir__, "_vespa_json_indexes", namespace + "_index.json") index_file.content = json index_file.data["layout"] = nil index_file