Cyborg Network M1 eval #510
Workflow file for this run
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
name: Award badge or comment on last milestone | |
on: | |
pull_request_target: | |
types: [closed] | |
jobs: | |
get-delivery-files: | |
runs-on: ubuntu-latest | |
outputs: | |
filenames: ${{ steps.files.outputs.added }} | |
steps: | |
- name: Get filenames of any deliveries being added | |
id: files | |
uses: Ana06/[email protected] | |
with: | |
format: 'json' | |
filter: | | |
deliveries/*.md | |
maintenance_deliveries/*.md | |
check-needs-badge: | |
runs-on: ubuntu-latest | |
needs: get-delivery-files | |
if: github.event.pull_request.merged == true && needs.get-delivery-files.outputs.filenames != '[]' | |
outputs: | |
needs_badge: ${{ steps.badge-check.outputs.check && github.event.pull_request.merged == true }} | |
needs_last_milestone_comment: ${{ steps.last-milestone.outputs.check && github.event.pull_request.merged == true }} | |
request_invoice: ${{ github.event.pull_request.merged == true && needs.get-delivery-files.outputs.filenames != '[]' && github.event.pull_request.merged == true }} | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
filename: ${{ fromJson(needs.get-delivery-files.outputs.filenames) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Parse delivery file | |
id: parse-delivery | |
uses: w3f/parse-milestone-delivery-action@master | |
with: | |
path: "${{ github.workspace }}/${{ matrix.filename }}" | |
- name: Get application file | |
run: wget "https://raw.githubusercontent.com/w3f/Grants-Program/master/applications/${{ steps.parse-delivery.outputs.application_document }}" | |
- name: Parse application file | |
id: parse-grant | |
uses: w3f/parse-grant-application-action@master | |
with: | |
path: "${{ steps.parse-delivery.outputs.application_document }}" | |
- name: Check if this PR needs a badge comment | |
id: badge-check | |
# A matrix strategy overwrites outputs, meaning `needs_badge` will be `true` if atleast one of the files matches the following condition. | |
# This way, there'll only be max 1 comment left per PR | |
if: steps.parse-delivery.outputs.milestone_number == 1 && steps.parse-grant.outputs.level != 1 | |
run: echo "check=true" >> $GITHUB_OUTPUT | |
- name: Check if this PR needs a "last milestone" comment | |
id: last-milestone | |
if: ${{ !steps.parse-delivery.is_maintenance && steps.parse-delivery.outputs.milestone_number == steps.parse-grant.outputs.total_milestones }} | |
run: echo "check=true" >> $GITHUB_OUTPUT | |
comment-badge: | |
runs-on: ubuntu-latest | |
needs: check-needs-badge | |
if: needs.check-needs-badge.outputs.needs_badge | |
steps: | |
- name: Leave badge comment if applicable | |
uses: thollander/[email protected] | |
with: | |
message: > | |
Congratulations on completing the first milestone of this grant! | |
As part of the Grants Program, we want to help grant recipients acknowledge their grants publicly. | |
To that end, we've created a [badge for projects](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/grant-badge-guidelines.md) | |
that successfully deliver their first milestone. | |
Please use the badge only in reference to the work that has been completed as part of this grant, | |
so please do not display it on your team or project's homepage unless accompanied by a short description of the grant. | |
Furthermore, you're now welcome to announce the grant publicly. Please remember to observe the | |
[foundation's guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/announcement-guidelines.md) in doing so. | |
If you haven't already, reach out to [email protected] for feedback on your announcement and cross-promotion.<br/><br/> | |
Thank you for your contribution, and good luck! | |
If you have any remaining milestone, let us know if you encounter any delays by leaving a comment on the application PR | |
or submitting an [amendment](https://github.com/w3f/Grants-Program#changes-to-a-grant-after-approval). | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
comment-last-milestone: | |
runs-on: ubuntu-latest | |
# "comment-badge" in needs so we establish the correct messages order | |
needs: [comment-badge, check-needs-badge] | |
# "always()" will make this job run also if one of the needs is not completed; | |
# in this way, the last_milestone comment will be sent also if the badge comment wasn't | |
if: always() | |
steps: | |
- name: Last milestone comment | |
if: needs.check-needs-badge.outputs.needs_last_milestone_comment | |
uses: thollander/[email protected] | |
with: | |
message: > | |
We noticed that this is the last milestone of your project. Congratulations on completing your grant! 🎊<br/> | |
So, where to from here? First of all, you should join our [Grants Community chat](https://matrix.to/#/!XpynPDLusWUWfDpaqr:matrix.org?via=web3.foundation&via=matrix.org), if you haven't already, so we can stay in touch. | |
If you are looking for continuative support for your project, there are quite a few options. The main goal of the W3F grants program is to support research as well as early-stage technical projects. If your project still falls under one of those categories, you might want to apply for a follow-up grant. However, depending on your goals and project status, there are other support programs in our ecosystem that might be better suited as the next step. For example, projects with a Business Case/Token should look into the [Substrate Builders Program](https://substrate.io/ecosystem/substrate-builders-program/) or [VC Funding](https://parachains.info/investors) and Common Good projects have a good chance of receiving [Treasury Funding](https://github.com/w3f/Grants-Program#treasury). If you are looking for guidance, the team at https://substrate.io/ecosystem/square-one/ has compiled a list of ecosystem support sources and are happy to help you navigate it.<br/> | |
For a more comprehensive list, see our [Alternative Funding page](https://w3f.github.io/Grants-Program/funding). Let us know if you have any questions regarding the above. We are more than happy to point you to additional resources and help you determine the best course of action. | |
Lastly, we hope your W3F grant was a success and we want to thank you for being part of the journey! | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
request-invoice: | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Request invoice | |
if: github.event.pull_request.merged == true && needs.get-delivery-files.outputs.filenames != '[]' | |
uses: thollander/[email protected] | |
with: | |
message: > | |
:coin: Please fill out the [invoice form](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform?usp=pp_url&entry.1070766548=${{github.event.pull_request.html_url}}) in order to initiate the payment process. Thank you! | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |