This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
forked from 5afe/safe-react
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
104 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Publish Containers | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'inomurko/v3.14.5' | ||
|
||
jobs: | ||
|
||
start-runner: | ||
name: Start self-hosted EC2 runner | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.start-ec2-runner.outputs.label }} | ||
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} | ||
steps: | ||
- name: Configure AWS credentials | ||
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: ${{ secrets.AWS_REGION }} | ||
- name: Start EC2 runner | ||
id: start-ec2-runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: start | ||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
ec2-image-id: ami-00b46fa1102c70ff2 | ||
ec2-instance-type: t2.xlarge | ||
subnet-id: subnet-905870ae | ||
security-group-id: sg-0855631d714870b32 | ||
|
||
build-publish-win: | ||
needs: start-runner | ||
runs-on: ${{ needs.start-runner.outputs.label }} | ||
|
||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Get services | ||
working-directory: ./boba_ops | ||
run: git submodule sync --recursive | ||
|
||
- name: Build the services | ||
working-directory: ./boba_ops | ||
run: docker compose build | ||
|
||
- name: Tag | ||
working-directory: ./ops | ||
run: | | ||
for i in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep bobanetwork); do | ||
docker image tag "$i" bobanetwork/$(echo $i | awk -F'/' '{print $2}' | awk -F':' '{print $1}'):latest | ||
done | ||
docker images | ||
- name: Push | ||
working-directory: ./ops | ||
run: | | ||
for i in $(docker images --format "{{.Repository}}:{{.Tag}}" | grep bobanetwork); do | ||
echo "$1" | ||
docker push "$i" | ||
done | ||
stop-runner: | ||
name: Stop self-hosted EC2 runner | ||
needs: | ||
- start-runner # required to get output from the start-runner job | ||
- build-publish-win # required to wait when the main job is done | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs | ||
steps: | ||
- name: Configure AWS credentials | ||
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: ${{ secrets.AWS_REGION }} | ||
- name: Stop EC2 runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
label: ${{ needs.start-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} |
This file was deleted.
Oops, something went wrong.
Submodule safe-transaction-service
updated
from fd9c0c to 081aeb