-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (81 loc) · 2.59 KB
/
release-build.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Docker Build Publish
on:
pull_request:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc*'
env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT }}"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SLACK_BOT_TOKEN: "${{ secrets.SLACK_TOKEN }}"
SLACK_CHANNEL: "eng-build-failures"
jobs:
test-build:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: kiva/github-actions
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/[email protected]
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: docker-build
uses: ./.github/actions/docker-build-push
if: github.event_name == 'pull_request'
with:
dockerfile_target: "release"
push: false
# Build and push the image to ECR
build:
runs-on: ubuntu-latest
# Run on merges to development or tag pushes (done by create-release workflow)
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout actions
uses: actions/checkout@v3
with:
repository: kiva/github-actions
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/[email protected]
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: docker-push
uses: ./.github/actions/docker-build-push
with:
dockerfile_target: "release"
push: true