Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ci.yml #28

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ jobs:
create: true # Create the feature flag + subgraphs from cosmo.yaml
cosmo_api_key: ${{ secrets.COSMO_API_KEY }}
github_token: ${{ secrets. GITHUB_TOKEN }}

- run: |
echo "Feature flag has been created. You can now provision the subgraph service."
echo "${{ steps.ff.outputs.feature_subgraphs_to_deploy }}"

# run the job to deploy all the changed subgraphs here.

Expand Down Expand Up @@ -66,8 +67,10 @@ jobs:
update: true # Only update the feature subgraphs from cosmo.yaml
cosmo_api_key: ${{ secrets.COSMO_API_KEY }}
github_token: ${{ secrets. GITHUB_TOKEN }}

- run: |
echo "Feature subgraph has been updated. You can now update the subgraph service."
echo "${{ steps.ff.outputs.feature_subgraphs_to_deploy }}"
echo "${{ steps.ff.outputs.feature_subgraphs_to_destroy }}"

destroy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,3 +99,5 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: |
echo "Feature flag and the feature subgraphs have been destroyed. You can now unprovision the subgraph services."
- run: |
echo "${{ steps.ff.outputs.feature_subgraphs_to_destroy }}"
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ The `destroy` job is triggered when a pull request is closed. It performs the fo
3. Installs the latest version of the `wgc` CLI tool.
4. Destroys all the feature flags and feature subgraphs created for the pull request.

## Outputs

- `feature_subgraphs_to_deploy`: A list of feature subgraphs to deploy. This output is provided in the create and update jobs.
- `feature_subgraphs_to_destroy`: A list of feature subgraphs to destroy. This output is provided in the update and destroy jobs.

## Limitations

1. The cosmo.yaml file should not be changed after the pull request is opened. If changes are to be made, the pull request should be closed and reopened.
1. The cosmo.yaml file should not be changed after the pull request is opened. If changes are to be made, the pull request should be closed and reopened. Make sure that the destroy action is completed before reopening the pull request.
Loading