Skip to content

Commit

Permalink
hof/ci: upgrade dagger (#400)
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Worm <[email protected]>
  • Loading branch information
verdverm and Tony Worm authored Dec 18, 2024
1 parent 1f0e59b commit fd7e7ec
Show file tree
Hide file tree
Showing 25 changed files with 399 additions and 299 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Vars
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- name: hof-in-dagger
run: go run ./test/dagger/main/hof.go
env:
GITHUB_TOKEN: ${{secrets.HOF_HOMEBREW_PAT}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITLAB_TOKEN: ${{secrets.GITLAB_TOKEN}}
BITBUCKET_USERNAME: hofstadter
BITBUCKET_PASSWORD: ${{secrets.BITBUCKET_TOKEN}}
Expand Down
3 changes: 3 additions & 0 deletions ci/gha/common/steps.cue
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ Steps: {
"restore-keys": "${{ runner.os }}-dagger-"
}
}
env: {
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
}
}

gcloud: {
Expand Down
4 changes: 2 additions & 2 deletions ci/gha/dagger.cue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ghacue.#Workflow & {
}

steps: [
common.Steps.go.setup & {#ver: "1.21.x"},
common.Steps.go.setup & {#ver: "1.23.x"},
common.Steps.checkout,
common.Steps.vars,
common.Steps.go.deps,
Expand Down Expand Up @@ -58,7 +58,7 @@ ghacue.#Workflow & {
name: "hof-in-dagger"
run: "go run ./test/dagger/main/hof.go"
env: {
GITHUB_TOKEN: "${{secrets.HOF_HOMEBREW_PAT}}"
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
GITLAB_TOKEN: "${{secrets.GITLAB_TOKEN}}"
BITBUCKET_USERNAME: "hofstadter"
BITBUCKET_PASSWORD: "${{secrets.BITBUCKET_TOKEN}}"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/data-modeling/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Similar:

- [Atlas](https://atlasgo.io/) & [Ent](https://entgo.io/)
- [Prisma](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model)
- [Hasura](https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/index.html)
- [Hasura](https://hasura.io/docs/1.0/graphql/core/schema/index.html)


Questions:
Expand Down
3 changes: 2 additions & 1 deletion docs/hack/make/lint.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# https://github.com/stevenvachon/broken-link-checker
BLC_EXCLUDES=--exclude 'https://github.com/hofstadter-io/hof/issues/new' \
--exclude 'https://github.com/hofstadter-io/hof/edit'
--exclude 'https://github.com/hofstadter-io/hof/edit' \
--exclude 'https://github.com/hofstadter-io/hof/releases'
blc.dev:
blc -ro http://localhost:1313 ${BLC_EXCLUDES}
blc.prd:
Expand Down
2 changes: 1 addition & 1 deletion formatters/tools/prettier/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN for i in $(seq 1 5); do \
&& s=0 && break || s=$? && echo "RETRY $i" && sleep $i; done; (exit $s)

# our server code
COPY prettier.js .
COPY prettier.js prettierrc.json /app/

# runtime settings
EXPOSE 3000
Expand Down
3 changes: 2 additions & 1 deletion formatters/tools/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"@prettier/plugin-php": "^0.19.3",
"@prettier/plugin-ruby": "^3.2.2",
"express": "^4.18.2",
"prettier": "^2.8.4",
"prettier": "^3.4.2",
"prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-groovy": "^0.0.2",
"prettier-plugin-java": "^2.6.0",
"prettier-plugin-rust": "^0.1.8",
"prettier-plugin-sql": "^0.13.0"
}
Expand Down
12 changes: 5 additions & 7 deletions formatters/tools/prettier/prettier.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// const express = require('express');
// const prettier = require("prettier");
import express from 'express'
import prettier from 'prettier'
import * as prettier from 'prettier'

const app = express();

Expand All @@ -12,21 +10,21 @@ app.use(
);
app.use(express.json({limit: "50mb", extended: true, parameterLimit:50000}));

app.get('/', (req, res) => {
var info = prettier.getSupportInfo();
app.get('/', async (req, res) => {
var info = await prettier.getSupportInfo();
res.write(JSON.stringify(info));
res.end();
});

app.post('/', (req, res) => {
app.post('/', async (req, res) => {
// TODO, add debug level (env) and print
// console.log(req.body);
//
var source = req.body.source;
var config = req.body.config;

try {
var fmt = prettier.format(source, config);
var fmt = await prettier.format(source, config);
res.write(fmt);
res.end();
} catch(error) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"plugins": [
"@prettier/plugin-php",
"@prettier/plugin-ruby",
"prettier-plugin-go-template",
"prettier-plugin-groovy",
"prettier-plugin-java",
"prettier-plugin-rust",
"prettier-plugin-sql"
],
"languages": [
{
"linguistLanguageId": 183,
Expand Down
Loading

0 comments on commit fd7e7ec

Please sign in to comment.