Skip to content

Commit f401311

Browse files
committed
update run.sh for all datasets and and publish action
1 parent d1d982c commit f401311

2 files changed

Lines changed: 63 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
inputs:
7+
environment:
8+
type: environment
9+
description: The environment to deploy to.
10+
11+
jobs:
12+
detect-environments:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
environments: ${{ steps.environments.outputs.result }}
16+
steps:
17+
- uses: actions/github-script@v6
18+
id: environments
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
result-encoding: json
22+
script: |
23+
if (context.payload?.inputs?.environment) return [context.payload?.inputs?.environment];
24+
const {data: {environments}} =
25+
await github.request(`GET /repos/${process.env.GITHUB_REPOSITORY}/environments`);
26+
return environments.map(e => e.name)
27+
28+
deploy:
29+
runs-on: ubuntu-latest
30+
env:
31+
DOCKER_REPO: ${{ secrets.DEPLOY_DOCKER_REPOSITORY }}
32+
needs: [detect-environments]
33+
strategy:
34+
matrix:
35+
environment: ${{ fromJSON(needs.detect-environments.outputs.environments) }}
36+
environment: ${{ matrix.environment }}
37+
if: github.ref_name == 'main'
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- id: vars
42+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
43+
44+
- uses: aws-actions/configure-aws-credentials@v1-node16
45+
with:
46+
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
47+
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
48+
aws-region: us-east-1
49+
50+
- uses: aws-actions/amazon-ecr-login@v2
51+
with:
52+
registry-type: public
53+
54+
- run: docker pull $DOCKER_REPO:${GITHUB_REF_NAME} || echo "no current latest image"
55+
56+
- run: docker build -t $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} .
57+
58+
- run: docker tag $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} $DOCKER_REPO:${GITHUB_REF_NAME}
59+
60+
- run: docker push $DOCKER_REPO:${{ steps.vars.outputs.sha_short }}
61+
62+
- run: docker push $DOCKER_REPO:${GITHUB_REF_NAME}

run.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/bash
22
set -e
33

4-
make data/reporting/duplicate_entity_expectation.csv
5-
6-
7-
4+
make all -j 8

0 commit comments

Comments
 (0)