-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (40 loc) · 1.2 KB
/
main.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
name: CI
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
env:
AWS_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
- name: Set version
id: version
shell: bash
run: |
source version.env
echo "$VERSION"
echo ::set-output name=version::$VERSION
- name: Install Minio
run: |
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
sudo chmod +x mc
sudo mv ./mc /usr/bin
mc alias set spaces $AWS_S3_ENDPOINT $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4
- name: Build docker image
run: |
docker build --tag pad-normalize .
- name: Build dataset!
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
docker run --user $(id -u):$(id -g) \
-v $(pwd)/data:/usr/local/src/scripts/data pad-normalize $VERSION
- name: Upload!
if: github.ref == 'refs/heads/main'
env:
VERSION: ${{ steps.version.outputs.version }}
run: ./push-to-bucket.sh