-
Notifications
You must be signed in to change notification settings - Fork 107
39 lines (35 loc) · 1.25 KB
/
build-feature-image.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
name: Build feature Docker image
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- 'feature/orgs'
workflow_dispatch:
jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
if: (!startsWith(github.head_ref, 'rc/') || !startsWith(github.head_ref, 'hotfix/') || !startsWith(github.head_ref, 'master') || !startsWith(github.head_ref, 'main'))
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create variables
id: vars
run: |
echo "tag=$(echo ${{ github.head_ref }}-${{ github.run_number }} | tr '/' '-')" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
outputs:
tag: ${{ steps.vars.outputs.tag }}
date: ${{ steps.vars.outputs.date }}
call-docker-build:
name: Call feature Docker build
needs: variables-setup
uses: reportportal/.github/.github/workflows/build-docker-image.yaml@main
with:
aws-region: ${{ vars.AWS_REGION }}
image-tag: ${{ needs.variables-setup.outputs.tag }}
version: ${{ needs.variables-setup.outputs.tag }}
branch: ${{ github.head_ref }}
date: ${{ needs.variables-setup.outputs.date }}
secrets: inherit