forked from chanzuckerberg/single-cell-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.39 KB
/
push-rdev.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
name: Push Remote Dev
on:
push:
tags:
- '*rdev'
- 'rdev*'
branches:
- 'rdev-*'
- '**/rdev-*'
- '**-rdev'
env:
DEPLOYMENT_STAGE: test
# Force using BuildKit instead of normal Docker, required so that metadata
# is written/read to allow us to use layers of previous builds as cache.
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_REPO: ${{ secrets.ECR_REPO }}/
permissions:
id-token: write
contents: read
jobs:
build-push-images:
runs-on: ubuntu-20.04
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: ${{ secrets.ECR_REPO }}
- uses: actions/checkout@v2
- name: Install happy
uses: chanzuckerberg/github-actions/.github/actions/[email protected]
with:
happy_version: "0.59.0"
- name: Build component
shell: bash
run: |
DOCKER_TAG=${GITHUB_REF#refs/heads/}
DOCKER_TAG=${DOCKER_TAG#refs/tags/}
# replace `/` with `_`
DOCKER_TAG=${DOCKER_TAG//\//-}
happy push --aws-profile "" --tag sha-${GITHUB_SHA:0:8} --tag ${DOCKER_TAG}