-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2496 from fetchai/develop
Release - packages only
- Loading branch information
Showing
134 changed files
with
1,671 additions
and
941 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,75 @@ | ||
name: Build, Publish and Deploy Docker Container | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Setup GCloud - sandbox | ||
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master | ||
if: github.ref == 'refs/heads/develop' | ||
with: | ||
project_id: ${{ secrets.GCLOUD_FETCH_AI_SANDBOX_PROJECT }} | ||
service_account_key: ${{ secrets.GCLOUD_FETCH_AI_SANDBOX_KEY }} | ||
|
||
- name: Setup GCloud - production | ||
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
project_id: ${{ secrets.GCLOUD_FETCH_AI_PROD_PROJECT }} | ||
service_account_key: ${{ secrets.GCLOUD_FETCH_AI_PROD_KEY }} | ||
|
||
- name: Configure Docker | ||
run: | | ||
gcloud auth configure-docker | ||
- name: Set Image Tag | ||
id: vars | ||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
|
||
# Push image to Google Container Registry | ||
- name: Build and Push Images | ||
run: | | ||
chmod +x ./scripts/acn/build_upload_img.sh | ||
if [ ${{ github.ref }} == 'refs/heads/develop' ] | ||
then | ||
./scripts/acn/build_upload_img.sh | ||
fi | ||
if [ ${{ github.ref }} == 'refs/heads/main' ] | ||
then | ||
./scripts/acn/build_upload_img.sh prod | ||
fi | ||
- name: Repository Dispatch | ||
env: | ||
IMAGE_TAG: ${{ steps.vars.outputs.sha_short }} | ||
run: | | ||
if [ ${{ github.ref }} == 'refs/heads/develop' ] | ||
then | ||
curl -H "Accept: application/vnd.github.everest-preview+json" \ | ||
-H "Authorization: token ${{ secrets.GH_PAT }}" \ | ||
--request POST \ | ||
--data '{"event_type": "agents-dht-testnet", "client_payload": {"image": "gcr.io/fetch-ai-sandbox/acn_node", "tag": "'"$IMAGE_TAG"'"}}' \ | ||
https://api.github.com/repos/fetchai/infra-sandbox-london-b-deployment/dispatches | ||
fi | ||
if [ ${{ github.ref }} == 'refs/heads/main' ] | ||
then | ||
curl -H "Accept: application/vnd.github.everest-preview+json" \ | ||
-H "Authorization: token ${{ secrets.GH_PAT }}" \ | ||
--request POST \ | ||
--data '{"event_type": "agents-dht", "client_payload": {"image": "gcr.io/fetch-ai-images/acn_node", "tag": "'"$IMAGE_TAG"'"}}' \ | ||
https://api.github.com/repos/fetchai/infra-mainnet-v2-deployment/dispatches | ||
fi |
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
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
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
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
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
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
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
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
Oops, something went wrong.