-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.37 KB
/
vm-release.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
# Copyright (C) 2024, Nuklai. All rights reserved.
# See the file LICENSE for licensing terms.
name: VM Release deployment
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AWS_REGION: ${{ vars.AWS_REGION }}
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID }}
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }}
PRODUCT: nuklaivm
APPLICATION: nodes
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/prod' && 'prod' || github.ref == 'refs/heads/dev' && 'dev' }}
steps:
- name: Checkout
uses: actions/checkout@v4
# - uses: ./.github/actions/vm-release
# with:
# vm-name: nuklaivm
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build tar ball
run: |
TARBALL=nuklaivm-${{ github.sha }}.tar.gz
EXCLUDES=$(cat .gitignore .dockerignore 2>/dev/null | grep -v '^#' | sed '/^$/d' | sed 's/^/--exclude=/' | tr '\n' ' ')
EXCLUDES+=" --exclude='./web_wallet'"
touch $TARBALL
eval "tar -czf $TARBALL --exclude=$TARBALL $EXCLUDES -C . ."
# - name: Push to S3
# run: |
# aws s3 sync s3://${{ env.AWS_S3_BUCKET }} --follow-symlinks --delete --no-progress