Comments (5)
On the core repo its done.
- A tag when pushed and the testCI is passed (in core repo) only then it will trigger the remote distributable repo (linux, window, mac) to make the dist repo accept the req.
(image from core repo LinuxCI)
![Screenshot 2024-06-21 at 2 28 19 AM](https://private-user-images.githubusercontent.com/90847875/341563505-bc8ab1bd-2826-430b-8639-d637a56e61be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzAyMDUsIm5iZiI6MTcyNDk2OTkwNSwicGF0aCI6Ii85MDg0Nzg3NS8zNDE1NjM1MDUtYmM4YWIxYmQtMjgyNi00MzBiLTg2MzktZDYzN2E1NmU2MWJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI5VDIyMTgyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4M2U4MTRmYWY4NGU3MWU1ZDI2YTE4NDNmODQ2ZmNhYmM0NGJkZWFiZjQ3MmZjOTBkOTlhOGNmMGZkOTFmN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.h_UGcxsqhgUzLze2bxa15EY9FCobDBZ3AH0XQhWDVqQ)
changes needed on the dist repo's
name: "MetaCall Distributable Release"
on:
repository_dispatch:
types: [test-trigger]
from core.
using this under the release.yml file so that dispatch runs when the release.yml file is build as mentioned needs: build
. if created a separate file for this it may sometimes run first or last as its picked or we would need to use if else statements, this is more easy.
name: Release
on:
push:
tags:
- 'v*.*.*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GHR_VERSION: 0.12.0
IMAGE_NAME: index.docker.io/metacall/core
IMAGE_REGISTRY: index.docker.io
ARTIFACTS_PATH: ./build-artifacts
# GITHUB_TOKEN - From default secrets
# GITHUB_REPOSITORY - Default variable
jobs:
build:
name: Build the core
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
.
.
.
. [continued in core]
.
.
dispatch:
needs: build
strategy:
matrix:
repo: ['company/repo1', 'company/repo2', 'company/repo3']
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: ${{ matrix.repo }}
event-type: test-trigger
This is what it would look like:
![Screenshot 2024-06-04 at 10 12 29 PM](https://private-user-images.githubusercontent.com/90847875/336551710-1e8f6232-b8ff-4650-b647-ea61aa05b49f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzAyMDUsIm5iZiI6MTcyNDk2OTkwNSwicGF0aCI6Ii85MDg0Nzg3NS8zMzY1NTE3MTAtMWU4ZjYyMzItYjhmZi00NjUwLWI2NDctZWE2MWFhMDViNDlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI5VDIyMTgyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhODE1ZjM3ODcxZDFmNWMwMDA2ZjQ4MTk2NjI3MzYyNTIyZmFhN2EyZjU5NzQzMDJlOTMyN2RhMjI1MmNkNTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.A-UPiRhStll_rnQQYtF1sAD5Wd09qtk8m8LUYSLGcP8)
from core.
We are not using release.yml file that often so 2 possible solution left.
- Create a separate
yml
file
name: CI Signal to other dist repos
on:
push:
tags:
- 'v*'
jobs:
check_completion:
runs-on: ubuntu-latest
outputs:
{other OS}
windows_success: ${{ steps.windows.outputs.success }}
> {Other OS checks}
- name: Check Windows Test Completion
id: windows
if: github.event.workflow_run.name == 'Windows Test'
run: |
echo "::set-output name=success::${{ github.event.workflow_run.conclusion == 'success' }}"
dispatch_windows:
if: ${{ steps.check_completion.outputs.windows_success == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Windows Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: shaggyyy2002/distributable-windows
event-type: test-trigger
- Add the code to the test files, so that when the test completes, it then trigger to that distributable repo eg. Windows test successful -> triggers -> dist-windows
trigger_dist_windows:
needs: windows-test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- name: Windows Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: metacall/distributable-windows
event-type: test-trigger
ref: ${{ github.ref }}
To solve the issue, I am using the 2 one so that no need to write extra code and logic. The first one (creating a separate file) would've required us to write something to make sure our dist repo triggers when all the checks and tests are passed. So choosing the 2nd option
✅ Our commit & tag when pushed it did trigger the dist repo.
❌ The error facing right now is in the dist repo to release it, it needs a git tag, which is being passed from the core repo but its not accessible from the dist repos.
from core.
some minor changes: we are using client-payload: '{"ref": "${{ github.ref }}"}'
the earlier ref: ${{ github.ref }}
is deprecated for v3 dispatch.
More info : https://github.com/peter-evans/repository-dispatch
from core.
![Screenshot 2024-06-28 at 9 05 33 PM](https://private-user-images.githubusercontent.com/90847875/344228239-b9ccebc9-b15a-4041-9f3a-2601335f931a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzAyMDUsIm5iZiI6MTcyNDk2OTkwNSwicGF0aCI6Ii85MDg0Nzg3NS8zNDQyMjgyMzktYjljY2ViYzktYjE1YS00MDQxLTlmM2EtMjYwMTMzNWY5MzFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI5VDIyMTgyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3NjY1ZWQ2Zjc2MTk2NDczMjJjNWZhZTk0NDIxNDU5NzQ3ZDEyZjIxMDM3YTMyNTdlYmE4NDQ0Nzc0YmMxODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1FPoqabE6acuIk7YL4K1nIqp_EsLuBlA6Nu618iwbIs)
from core.
Related Issues (20)
- Support MSYS2+Mingw64 on Windows
- Docker Multi Architecture Images HOT 2
- build failure with node loader: icu4c v72.x is too old, v73.x or later is required
- arm64 test build fail HOT 2
- Embed metacall with node loader inside an environment with v8 already in place HOT 1
- Metacall runtime.sh - small enhancement HOT 1
- Segmentation fault (core dumped): Potential deadlock detected in function_node_interface_invoke HOT 2
- Setup workflow dispatch in Actions for metacall/homebrew HOT 1
- Metacall Acess Token not set to httpOnly HOT 1
- Thread deadlock in the NodeJS loader HOT 1
- Use metacall/libnode inside the Metacall Environment
- Bug: argv issue while running metacall-deploy with metacall runtime HOT 1
- packages issue in rpc and backtrace in metacall-runtime.sh HOT 1
- Error when running auth-function-mesh example HOT 1
- bug: incorrectly calculating the size of script that is loaded from memory HOT 2
- CTest failing while building metacall
- NodeJS Loader could not convert the value of type 'Invalid' to N-API HOT 2
- Exporting in the node port HOT 1
- Livelock generated in test `metacall-node-python-await-extended-test`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.