Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Feb 1, 2024
1 parent 8d45497 commit 7e14db0
Show file tree
Hide file tree
Showing 5 changed files with 546 additions and 420 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/gen_schedule_update_deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: "gen: update depenendencies"
on:
schedule:
- cron: '0 2 1 * *'

jobs:
run:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write
pull-requests: write

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure aws
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}:role/github-actions-nhost-be
aws-region: eu-central-1

- uses: nixbuild/nix-quick-install-action@v26
with:
nix_version: 2.16.2
nix_conf: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
- name: Cache nix store
uses: actions/cache@v4
with:
path: /nix
key: nix-update-deps-${{ hashFiles('flakes.nix', 'flake.lock') }}

- name: Update nix flakes
run: nix flake update

- name: Update golang dependencies
run: |
nix develop -c bash -c "
go mod tidy
go get -u ./...
go mod tidy
go mod vendor
"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update dependencies
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: automated/update-deps
delete-branch: true
title: '[Scheduled] Update dependencies'
body: |
Dependencies updated
Note - If you see this PR and the checks haven't run, close and reopen the PR. See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
labels: |
dependencies
draft: false

- name: "Cache nix store on s3"
run: |
echo ${{ secrets.NIX_CACHE_PRIV_KEY }} > cache-priv-key.pem
nix build .\#devShells.x86_64-linux.default
nix store sign --key-file cache-priv-key.pem --all
nix copy --to s3://nhost-nix-cache\?region=eu-central-1 .\#devShells.x86_64-linux.default
- run: rm cache-priv-key.pem
if: always()
54 changes: 42 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
description = "Nhost Hasura Auth";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter";
flake-utils.url = "github:numtide/flake-utils";
nixops.url = "github:nhost/nixops";
nixpkgs.follows = "nixops/nixpkgs";
flake-utils.follows = "nixops/flake-utils";
nix-filter.follows = "nixops/nix-filter";
};

outputs = { self, nixpkgs, flake-utils, nix-filter }:
outputs = { self, nixops, nixpkgs, flake-utils, nix-filter }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
nixops.overlays.default
(final: prev: {
nodejs = prev.nodejs-18_x;
})
Expand Down Expand Up @@ -87,11 +89,11 @@
gnumake
] ++ buildInputs ++ nativeBuildInputs;

shellHook = ''
export PATH=${node_modules}/node_modules/.bin:$PATH
rm -rf node_modules
ln -sf ${node_modules}/node_modules/ node_modules
'';
# shellHook = ''
# export PATH=${node_modules}/node_modules/.bin:$PATH
# rm -rf node_modules
# ln -sf ${node_modules}/node_modules/ node_modules
# '';
};
};
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"@djgrant/postgres-migrations": "4.1.0-rc.1",
"@simplewebauthn/server": "^5.4.5",
"axios": "^1.6.5",
"axios": "^1.6.7",
"bcryptjs": "^2.4.3",
"body-parser": "1.19.0",
"compare-urls": "^2.0.0",
Expand All @@ -36,7 +36,7 @@
"email-validator": "^2.0.4",
"express": "4.17.1",
"express-jsdoc-swagger": "^1.8.0",
"express-session": "^1.17.3",
"express-session": "^1.18.0",
"express-winston": "^4.2.0",
"grant": "^5.4.22",
"graphql": "16.2.0",
Expand All @@ -46,14 +46,14 @@
"helmet": "3.22.0",
"hibp": "9.0.0",
"http-status-codes": "^2.3.0",
"joi": "^17.11.0",
"joi": "^17.12.1",
"joi-to-swagger": "^6.2.0",
"jose": "^5.2.0",
"js-yaml": "3.13.1",
"json-to-graphql-query": "^2.2.5",
"jsonata": "^1.8.6",
"jsonwebtoken": "^9.0.2",
"libphonenumber-js": "^1.10.53",
"libphonenumber-js": "^1.10.54",
"micromatch": "^4.0.5",
"nocache": "^2.1.0",
"node-fetch": "^2.7.0",
Expand Down Expand Up @@ -94,7 +94,7 @@
"@types/jsonwebtoken": "^8.5.9",
"@types/micromatch": "^4.0.6",
"@types/node": "^17.0.45",
"@types/node-fetch": "^2.6.10",
"@types/node-fetch": "^2.6.11",
"@types/nodemailer": "6.4.0",
"@types/pg": "^7.14.11",
"@types/qrcode": "1.3.4",
Expand Down Expand Up @@ -126,7 +126,7 @@
"prettier": "^2.8.8",
"rfc2047": "^3.0.1",
"rimraf": "^3.0.2",
"supertest": "^6.3.3",
"supertest": "^6.3.4",
"ts-jest": "^27.1.5",
"ts-node-dev": "^1.1.8",
"tsc-alias": "^1.8.8",
Expand Down
Loading

0 comments on commit 7e14db0

Please sign in to comment.