Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e71115d
wait for finalization
fbielejec Oct 26, 2022
75ed49b
say no to oncurrent jobs
fbielejec Oct 26, 2022
4319384
trigger, remove labels
fbielejec Oct 26, 2022
3eca2eb
OK
fbielejec Oct 26, 2022
3992fe2
Merge branch 'benjamin' into fix-e2e
fbielejec Oct 26, 2022
a01b1fd
wtf
fbielejec Oct 26, 2022
d8cd778
show networks
fbielejec Oct 26, 2022
8841ccc
rerun
fbielejec Oct 26, 2022
9e6f1ab
short lived wf
fbielejec Oct 26, 2022
6a39be2
run it
fbielejec Oct 26, 2022
86b52a4
need code
fbielejec Oct 26, 2022
2bcced3
just use host
fbielejec Oct 26, 2022
55aaaef
mhm
fbielejec Oct 26, 2022
c4f86a0
co tu sie
fbielejec Oct 26, 2022
b16e4fe
debug
fbielejec Oct 26, 2022
24cd7ed
get a shell
fbielejec Oct 26, 2022
2607a3d
add missing flag
fbielejec Oct 26, 2022
fe78a4f
aaaaaa
fbielejec Oct 26, 2022
b827a29
get shell
fbielejec Oct 26, 2022
44a72db
show me the logs
fbielejec Oct 26, 2022
3c4a3c7
docke rnet
fbielejec Oct 26, 2022
52d6a89
fixit
fbielejec Oct 26, 2022
ed450be
off you go
fbielejec Oct 26, 2022
0d767f6
yesh
fbielejec Oct 26, 2022
e363769
test workflow dispatch
fbielejec Oct 26, 2022
47c790a
deployment triggered by tests
fbielejec Oct 26, 2022
b83f7af
cleanup
fbielejec Oct 26, 2022
698428f
TODOs
fbielejec Oct 27, 2022
5aff6c1
try the trigger
fbielejec Oct 27, 2022
8d41a20
add dispatch trigger
fbielejec Oct 27, 2022
7fbae16
Blend contracts e2e tests and deployment workflows into one workflow
keenbytes Oct 27, 2022
b1a7d6f
Oops! Remove duplicated workflow
keenbytes Oct 27, 2022
6277e75
addressing comments
fbielejec Oct 27, 2022
6a282a6
Add triggering indexer deployment workflow
keenbytes Oct 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
trigger, remove labels
  • Loading branch information
fbielejec committed Oct 26, 2022
commit 4319384796bc44e0d2234b9882ae659e0dcf018c
51 changes: 24 additions & 27 deletions .github/workflows/deploy-the-button.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Deploy The Button game

# triggered by the e2e-tests-contracts
on:
pull_request:
types: [labeled]
push:
branches:
- benjamin
paths:
- contracts/**
workflow_run:
workflows: [e2e-tests-contracts]
types:
- completed

# allow only once run instance of this workflow ever
concurrency:
Expand All @@ -21,16 +19,15 @@ env:
CARGOCONTRACT_REV: 2b1758756de59bd81e7bed5f8429d364f281cb9a
NODE_VERSION: 16
S3BUCKET_PATH: contracts/fe-benjamin-button
LABEL_DEPLOY_CONTRACTS: '[AZERO] DEPLOY-CONTRACTS'
LABEL_DESTROYED: 'DESTROYED'
LABEL_DEPLOYED: 'DEPLOYED'
LABEL_DEPLOYED_CONTRACTS: 'DEPLOYED-CONTRACTS'
# LABEL_DEPLOY_CONTRACTS: '[AZERO] DEPLOY-CONTRACTS'
# LABEL_DESTROYED: 'DESTROYED'
# LABEL_DEPLOYED: 'DEPLOYED'
# LABEL_DEPLOYED_CONTRACTS: 'DEPLOYED-CONTRACTS'

jobs:
build_and_deploy_contracts:
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == '[AZERO] DEPLOY-CONTRACTS')
# if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == '[AZERO] DEPLOY-CONTRACTS')
runs-on: ubuntu-20.04
#runs-on: self-hosted
steps:
- name: Checkout repo
uses: actions/[email protected]
Expand Down Expand Up @@ -104,15 +101,15 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: Get contracts' target directories cache from S3 bucket
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOYED_CONTRACTS))
# if: (github.event_name == 'push') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOYED_CONTRACTS))
shell: bash
continue-on-error: true
run: |
aws s3 cp s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/targets.tgz targets.tgz
tar -xzf targets.tgz

- name: Copy metadata.json and addresses.json files from S3 bucket
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOYED_CONTRACTS))
# if: (github.event_name == 'push') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOYED_CONTRACTS))
shell: bash
run: |
aws s3 cp s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/addresses.json contracts/addresses.json
Expand Down Expand Up @@ -187,18 +184,18 @@ jobs:
-H 'Authorization: Bearer ${{ secrets.CI_GH_TOKEN }}' \
-d '{ "ref":"main", "inputs": { "buildImage": "false", "deployImage": "true", "buildFEBenjaminImage": "true", "deployFEBenjaminImage": "true" }}'

- name: Add label to mark that contracts have been deployed
uses: actions-ecosystem/[email protected]
with:
labels: ${{ env.LABEL_DEPLOYED_CONTRACTS }}
github_token: ${{ secrets.CI_GH_TOKEN }}

- name: Remove request label if exists
if: contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOY_CONTRACTS)
uses: actions-ecosystem/[email protected]
with:
labels: ${{ env.LABEL_DEPLOY_CONTRACTS }}
github_token: ${{ secrets.CI_GH_TOKEN }}
# - name: Add label to mark that contracts have been deployed
# uses: actions-ecosystem/[email protected]
# with:
# labels: ${{ env.LABEL_DEPLOYED_CONTRACTS }}
# github_token: ${{ secrets.CI_GH_TOKEN }}

# - name: Remove request label if exists
# if: contains(github.event.pull_request.labels.*.name, env.LABEL_DEPLOY_CONTRACTS)
# uses: actions-ecosystem/[email protected]
# with:
# labels: ${{ env.LABEL_DEPLOY_CONTRACTS }}
# github_token: ${{ secrets.CI_GH_TOKEN }}

- name: Create empty target directory so that restore-cache does not fail
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-tests-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
pull_request:
paths:
- 'contracts/**'
- '.github/**'
push:
branches:
- benjamin
paths:
- 'contracts/**'
- '.github/**'
workflow_dispatch:

concurrency:
Expand Down