-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (50 loc) · 1.57 KB
/
ci-arm.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
---
name: CI Arm
# Call CodeBuild as a runner to build Arm-CPU image
on: push
# on:
# push:
# branches: [main]
# paths-ignore:
# - 'README.md'
# - '.github/**'
# - '.vscode'
# - '.gitignore'
# pull_request:
# # branches: [main]
# types: [opened,synchronize,reopened,labeled,unlabeled]
env:
AWS_ROLE_TO_ASSUME: arn:aws:iam::770916339360:role/foo-dev-codebuild-github-action-role
AWS_REGION: ap-northeast-1
jobs:
build-prod:
name: Build prod image
runs-on: ubuntu-latest
permissions:
# Interact with GitHub OIDC Token endpoint for AWS
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
# https://github.com/aws-actions/configure-aws-credentials
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
with:
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_REGION }}
# No need to check out source
# - name: Checkout
# uses: actions/checkout@v2
- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: "foo-app-github-action-arm"
buildspec-override: ecs/buildspec.yml
env-vars-for-codebuild: |
custom,
requester,
event-name
env:
custom: my environment variable
requester: ${{ github.actor }}
event-name: ${{ github.event_name }}