-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdeploy.yml
43 lines (43 loc) · 1.42 KB
/
deploy.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
name: Deploy
on: workflow_dispatch
jobs:
deploy:
# https://github.com/devcontainers/ci/issues/192
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
./vendor/bundle
./node_modules
key: {{ "${{ runner.os }}-deploy-v1-${{ hashFiles('Gemfile.lock', 'yarn.lock') }}" }}
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: {{ "${{ secrets.AWS_ACCESS_KEY_ID }}" }}
aws-secret-access-key: {{ "${{ secrets.AWS_SECRET_ACCESS_KEY }}" }}
aws-region: us-east-1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: {{ "${{ github.repository_owner }}" }}
password: {{ "${{ secrets.GITHUB_TOKEN }}" }}
- name: Deploy
uses: devcontainers/ci@v0.2
with:
push: always
imageName: ghcr.io/rails-lambda/{% include "_cctmp/dash_name.txt" %}-devcontainer
cacheFrom: ghcr.io/rails-lambda/{% include "_cctmp/dash_name.txt" %}-devcontainer
env: |
CI
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_DEFAULT_REGION
AWS_REGION
runCmd: |
./bin/deploy