-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.92 KB
/
pull-request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: PullRequest
on:
pull_request: {}
env:
REGISTRY: registry.cloudscale-lpg-2.appuio.cloud
NAMESPACE: appuio-control-api-preview
IMAGE_NAME: cloud-portal
jobs:
build:
uses: ./.github/workflows/template-build.yaml
docker:
runs-on: ubuntu-latest
environment: preview
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
# by default, it creates the `:pr-#` tag in pull requests and branch name on `master`
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}
- name: Docker login
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.OPENSHIFT_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: ${{ !startsWith(github.head_ref, 'renovate/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
# Don't deploy with Renovate PRs
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
uses: ./.github/workflows/template-deploy.yaml
with:
namespace: appuio-control-api-preview
helm_release_name: portal-pr-${{ github.event.number }}
image_tag: pr-${{ github.event.number }}
revision: ${{ github.event.pull_request.head.sha }}
secrets:
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
keycloak_password: ${{ secrets.KEYCLOAK_PASSWORD }}
keycloak_user: ${{ secrets.KEYCLOAK_USER }}
glitch_tip_dsn: ${{ secrets.GLITCH_TIP_DSN }}
needs:
- build
- docker