Skip to content

Commit 0f28465

Browse files
authored
Add PR workflow with E2E tests (#23)
* Add PR workflow with E2E tests Build temp Docker image on PR and run E2E via reusable workflow. * Add latest tag to release workflow
1 parent 677b294 commit 0f28465

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/pr.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR CI
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: moonlight-protocol/provider-platform
15+
outputs:
16+
image: ghcr.io/moonlight-protocol/provider-platform:pr-${{ github.event.pull_request.head.sha }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- uses: docker/build-push-action@v6
27+
with:
28+
context: .
29+
push: true
30+
tags: ghcr.io/moonlight-protocol/provider-platform:pr-${{ github.event.pull_request.head.sha }}
31+
32+
e2e:
33+
needs: build
34+
uses: Moonlight-Protocol/local-dev/.github/workflows/e2e-reusable.yml@main
35+
with:
36+
provider_image_override: ${{ needs.build.outputs.image }}
37+
secrets:
38+
E2E_TRIGGER_TOKEN: ${{ secrets.E2E_TRIGGER_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
tags: |
3434
type=semver,pattern={{version}}
3535
type=semver,pattern={{major}}.{{minor}}
36+
type=raw,value=latest
3637
3738
- name: Build and push
3839
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)