Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pomerium/dev-backend
28 changes: 28 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "monthly"
groups:
gitsubmodule:
patterns:
- "*"
exclude-patterns:
- "deps/github.com/pomerium/**"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
groups:
npm:
patterns:
- "*"
15 changes: 15 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build

on:
pull_request:
push:
branches:
- "main"

jobs:
build:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Build
uses: ./.github/workflows/reusable-build.yaml
with:
ref: ${{ github.head_ref }}
34 changes: 34 additions & 0 deletions .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependabot

on:
pull_request:

jobs:
generate:
if: ${{ github.actor == 'dependabot[bot]' }}
name: Generate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ github.head_ref }}
submodules: "true"
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}

- name: Generate
run: make generate

- name: Commit
uses: devops-infra/action-commit-push@e6a24fad602d1f92e46432c89a7e0c7fdd45d62d
with:
github_token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}
commit_message: "dependabot: generate"

build:
if: ${{ github.actor == 'dependabot[bot]' }}
name: Build
needs: generate
uses: ./.github/workflows/reusable-build.yaml
with:
ref: ${{ github.head_ref }}
24 changes: 24 additions & 0 deletions .github/workflows/reusable-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build

on:
workflow_call:
inputs:
ref:
required: true
type: string

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ inputs.ref }}

- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444

- name: Build
run: make build
42 changes: 42 additions & 0 deletions .github/workflows/update-pomerium.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update Pomerium

on:
schedule:
- cron: "40 1 * * *"
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: "true"
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}

- name: Update Pomerium
run: make update-pomerium

- name: Generate
run: make generate

- name: Check for changes
id: git-diff
run: |
git config --global user.email "apparitor@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git add deps/github.com/pomerium/enterprise-client
git diff --cached --exit-code || echo "changed=true" >> $GITHUB_OUTPUT

- name: Create Pull Request
if: ${{ steps.git-diff.outputs.changed }} == 'true'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
author: GitHub Actions <apparitor@users.noreply.github.com>
body: "This PR updates Pomerium Dependencies"
commit-message: "ci: update pomerium dependencies"
delete-branch: true
labels: ci
title: "ci: update pomerium dependencies"
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
deps/*
lib/*
node_modules/
lib/
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "deps/github.com/pomerium/enterprise-client"]
path = deps/github.com/pomerium/enterprise-client
url = git@github.com:pomerium/enterprise-client
[submodule "deps/github.com/envoyproxy/protoc-gen-validate"]
path = deps/github.com/envoyproxy/protoc-gen-validate
url = git@github.com:envoyproxy/protoc-gen-validate
[submodule "deps/github.com/googleapis/googleapis"]
path = deps/github.com/googleapis/googleapis
url = git@github.com:googleapis/googleapis
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.PHONY: all
all: generate build

.PHONY: build
build: install
@echo "==> $@"
npm run build

.PHONY: build-cjs
build-cjs: install
@echo "==> $@"
npm run build:cjs

.PHONY: build-esm
build-esm: install
@echo "==> $@"
npm run build:esm

.PHONY: clean
clean:
@echo "==> $@"
npm run clean

.PHONY: generate
generate: install
@echo "==> $@"
./scripts/generate

.PHONY: install
install:
@echo "==> $0"
npm install

.PHONY: update-pomerium
update-pomerium:
@echo "==> $0"
git submodule update --remote deps/github.com/pomerium
1 change: 1 addition & 0 deletions deps/github.com/envoyproxy/protoc-gen-validate
Submodule protoc-gen-validate added at 3c1639
1 change: 1 addition & 0 deletions deps/github.com/googleapis/googleapis
Submodule googleapis added at ac02e4
1 change: 1 addition & 0 deletions deps/github.com/pomerium/enterprise-client
Submodule enterprise-client added at f2946d
Loading