-
Notifications
You must be signed in to change notification settings - Fork 41
74 lines (64 loc) · 1.89 KB
/
homebrew.yaml
File metadata and controls
74 lines (64 loc) · 1.89 KB
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
name: homebrew
on:
push:
branches:
- main
jobs:
homebrew:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
AWS_SDK_LOAD_CONFIG: true
AWS_PROFILE: cloudgraph-iac
NODE_ENV: "cicd"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
token: ${{secrets.GH_TOKEN}}
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
cache: yarn
- name: Mkdir .aws
run: mkdir -p ~/.aws
- name: Set .aws/config
run: |
cat << EOF > ~/.aws/config
[default]
region=us-east-1
output=json
[profile cloudgraph-iac]
role_arn = ${{ secrets.AWS_ROLE_ARN }}
source_profile = default
EOF
- name: Set .aws/credentials
run: |
cat << EOF > ~/.aws/credentials
[default]
aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EOF
- name: Install Packages
run: yarn install --prefer-offline --frozen-lockfile
- name: Build
run: yarn build
- name: Add SSH key
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.AUTODEPLOY_SSH_KEY }}" > ~/.ssh/github_actions
chmod 600 ~/.ssh/github_actions
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add ~/.ssh/github_actions
- name: Homebrew
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
git config --global user.email "no-reply@autocloud.dev"
git config --global user.name "autocloud-deploy-bot"
yarn homebrew