Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
esolitos authored and gitbutler-client committed Sep 3, 2024
1 parent 2b6d5f9 commit 0138316
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/.yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
extends: default

rules:
document-start:
present: false
line-length: disable
truthy:
check-keys: false
7 changes: 3 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
strategy:
matrix:
action-name: ${{fromJson(needs.prepare.outputs.container_names_json)}}
docker-platform: [linux/amd64, linux/arm64]

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -90,8 +89,8 @@ jobs:
push: true
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
platforms: linux/amd64,linux/arm64
# 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

4 changes: 2 additions & 2 deletions .github/workflows/jekyll-feed-to-vespa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions jekyll-build-json/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ inputs:
default: ./_config.yml
log_level:
description: 'Log level for Jekyll build.'
required: false
required: true
default: 'info'
token:
description: 'GitHub token'
required: true
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'
2 changes: 1 addition & 1 deletion jekyll-build-json/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions jekyll-build-json/vespa_index_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ class VespaIndexGenerator < Jekyll::Generator
priority :lowest
safe true

build_path = "_vespa_json_indexes"

def generate(site)
@site = site
puts "::debug::VespaIndexGenerator"
puts "site.config: #{(site.config).inspect}"

raise "Wrong parameter type, expected Jekyll::Site, got #{site.class}" unless site.is_a?(Jekyll::Site)
raise "Search configuration not found" unless site.config.key?("search")
Expand Down Expand Up @@ -65,7 +66,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__, build_path, namespace + "_index.json")
index_file.content = json
index_file.data["layout"] = nil
index_file
Expand Down

0 comments on commit 0138316

Please sign in to comment.