Skip to content
Open
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 .docker/Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY pkg/client-go/go.* pkg/client-go/

ENV CGO_ENABLED 1
ENV CGO_CPPFLAGS -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
ENV GOPROXY=https://proxy.golang.org,direct

RUN go mod download

Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @aeneasr @ory/product-development
* @SPHTech/identity-platform-team
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions .github/_workflows/licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/licenses.yml

name: Licenses

on:
pull_request:
push:
branches:
- main
- v3
- master

jobs:
licenses:
name: License compliance
runs-on: ubuntu-latest
steps:
- name: Install script
uses: ory/ci/licenses/setup@master
with:
token: ${{ secrets.ORY_BOT_PAT || secrets.GITHUB_TOKEN }}
- name: Check licenses
uses: ory/ci/licenses/check@master
- name: Write, commit, push licenses
uses: ory/ci/licenses/write@master
if:
${{ github.ref == 'refs/heads/main' || github.ref ==
'refs/heads/master' || github.ref == 'refs/heads/v3' }}
with:
author-email:
${{ secrets.ORY_BOT_PAT &&
'60093411+ory-bot@users.noreply.github.com' ||
format('{0}@users.noreply.github.com', github.actor) }}
author-name: ${{ secrets.ORY_BOT_PAT && 'ory-bot' || github.actor }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
91 changes: 31 additions & 60 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,31 @@
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.

This text will be included in the changelog. If applicable, include links to documentation or pieces of code.
If your change includes breaking changes please add a code block documenting the breaking change:

```
BREAKING CHANGES: This patch changes the behavior of configuration item `foo` to do bar. To keep the existing
behavior please do baz.
```
-->

## Related issue(s)

<!--
If this pull request

1. is a fix for a known bug, link the issue where the bug was reported in the format of `#1234`;
2. is a fix for a previously unknown bug, explain the bug and how to reproduce it in this pull request;
3. implements a new feature, link the issue containing the design document in the format of `#1234`;
4. improves the documentation, no issue reference is required.

Pull requests introducing new features, which do not have a design document linked are more likely to be rejected and take on average 2-8 weeks longer to
get merged.

You can discuss changes with maintainers either in the Github Discussions in this repository or
join the [Ory Chat](https://www.ory.com/chat).
-->

## Checklist

<!--
Put an `x` in the boxes that apply. You can also fill these out after creating the PR.

Please be aware that pull requests must have all boxes ticked in order to be merged.

If you're unsure about any of them, don't hesitate to ask. We're here to help!
-->

- [ ] I have read the [contributing guidelines](../blob/master/CONTRIBUTING.md).
- [ ] I have referenced an issue containing the design document if my change
introduces a new feature.
- [ ] I am following the
[contributing code guidelines](../blob/master/CONTRIBUTING.md#contributing-code).
- [ ] I have read the [security policy](../security/policy).
- [ ] I confirm that this pull request does not address a security
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[security@ory.com](mailto:security@ory.com)) from the maintainers to push
the changes.
- [ ] I have added tests that prove my fix is effective or that my feature
works.
- [ ] I have added or changed [the documentation](https://github.com/ory/docs).

## Further Comments

<!--
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc...
-->
## Contents

1. [Summary](#summary)
2. [Links](#links)
3. [Test Plan](#test-plan)

## Summary

// What changes are made / introduced in this PR?

### Problem

// Give a TL;DR, one sentence summary on the feature, issue, bug to resolve.

### Solution

// Give detailed explanation on the solution. What is the fix? Why do we need to do it this way? How does it resolve the error?

## Links

// JIRA card link, any published API docs, confluence etc.

## Test Plan

// How did you test your code?
// If you can't test this locally, describe how you will test it after the PR is merged
// Add details about how you setup your test (if any), and screenshots of the test results whenever possible

### Test Method

### Test Results
81 changes: 81 additions & 0 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build and Push Image to ECR
on:
workflow_dispatch:
inputs:
commit_sha:
description: "Commit SHA to build"
required: true
environment:
description: "Environment to build"
required: true

permissions:
id-token: write

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
short_sha: ${{ steps.get-short-sha.outputs.short_sha }}
steps:
- name: Compute short SHA
id: get-short-sha
env:
FULL_SHA: ${{ github.event.inputs.commit_sha || 'master' }}
run: |
echo "short_sha=${FULL_SHA::7}" >> "$GITHUB_OUTPUT"

build:
runs-on: ubuntu-latest
needs: prepare
environment: ${{ github.event.inputs.environment || 'dev'}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_sha || 'master' }}
path: .

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"

- run: go version

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_IAM_ROLE }}
role-skip-session-tagging: true
role-session-name: gh-actions
aws-region: ${{ vars.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
with:
version: latest

- name: Build kratos binary
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o kratos .

- name: Get Image name:tag
id: get-image-name
run: |
echo "image_name=${{ steps.login-ecr.outputs.registry }}/idpf/kratos:${{ needs.prepare.outputs.short_sha }}" >> "$GITHUB_OUTPUT"

- name: Build Docker Image
run: |
docker build -f .docker/Dockerfile-alpine -t ${{ steps.get-image-name.outputs.image_name }} .

- name: Push Docker Image
run: |
docker push ${{ steps.get-image-name.outputs.image_name }}
Loading