Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLATFORM-2230]: Create an MVP for webkit support #1

Merged
merged 22 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 20 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
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use flake
export RUST_LOG=info
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
* @primait/shared-services
43 changes: 43 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CD

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: "The tag name to use"
required: true
type: string

jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c
- uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b

- run: nix build .#dockerImage
- run: docker load -i ./result

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::193543784330:role/oidc-github-ecr-webkit-pdf-inator
aws-region: us-east-1

- name: Login to public ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: "true"
registry-type: public

- name: Push image
run: |-
docker push webkit-pdf-inator \
"public.ecr.aws/primaassicurazioni/webkit-pdf-inator:${{ inputs.tag_name || github.event.release.tag_name }}"
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Test"
on:
pull_request:
push:
jobs:
get-flake-checks:
runs-on: ubuntu-latest
outputs:
flake-checks: "${{ steps.set-outputs.outputs.checks }}"
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c
- uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b
- run: >
nix flake show --json
| jq -rc '.checks["x86_64-linux"]
| keys' >> "flake-checks"
- id: set-outputs
run: echo "checks=$(cat flake-checks)" >> "$GITHUB_OUTPUT"

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c
- uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b
- run: nix build

flake-checks:
runs-on: ubuntu-latest
needs: [ get-flake-checks, build ]
strategy:
matrix:
check: ${{ fromJSON(needs.get-flake-checks.outputs.flake-checks) }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c
- uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b
- run: nix build -L ".#checks.x86_64-linux.$check"
env:
check: "${{ matrix.check }}"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target
result*
.direnv/
*.pdf
Loading
Loading