-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.59 KB
/
build.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
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
name: Build
on:
workflow_dispatch:
pull_request:
branches:
- '**'
env:
DOCKER_BUILDKIT: '1'
defaults:
run:
shell: bash
permissions:
id-token: write
contents: read
actions: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
name: 01-build.sh
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run 01-build.sh
run: ./deploy-scripts/01-build.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAG: ga-${{ github.run_number }}
TRUST_STORE_PASSWORD: ${{ secrets.TRUST_STORE_PASSWORD }}
lint:
name: 02-lint.sh
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.1
- name: Run 02-lint.sh
run: ./deploy-scripts/02-lint.sh
push_image:
name: 03-push-image.sh
if: github.event_name == 'workflow_dispatch'
needs: [ lint, build ]
permissions:
packages: write
id-token: write
contents: read
runs-on: 'ubuntu-24.04'
steps:
- name: Fetch history for all branches and tags
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push image
uses: ./.github/actions/push_image
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
aws-arn: ${{ secrets.AWS_AOE_UTILITY_ROLE_ARN }}
image-tag: ga-${{ github.run_number }}