generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.21 KB
/
pr-open.yml
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
name: PR
on:
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
# PR open and close use the same group, allowing only one at a time
group: pr-${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
Builds:
if: "!github.event.pull_request.head.repo.fork"
permissions:
packages: write
runs-on: ubuntu-22.04
strategy:
matrix:
package: [bitnami/postgresql, postgres/postgres]
tag: [12, 13, 14, 15, 16]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Get tag
id: tag
run: |
TAG=$(grep '^FROM' ${{ matrix.package }}/${{ matrix.tag }}/Dockerfile | cut -d':' -f2)
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Build or import
uses: bcgov-nr/[email protected]
with:
build_context: ${{ matrix.package }}/${{ matrix.tag }}
package: ${{ matrix.package }}
tag: ${{ steps.tag.outputs.tag }}
token: ${{ github.token }}
triggers: ${{ matrix.package}}/${{ matrix.triggers }}
Analysis:
needs: [Builds]
uses: ./.github/workflows/analysis.yml