Skip to content

Commit

Permalink
feat: create strain_dispatcher.yml
Browse files Browse the repository at this point in the history
feat: test some references

chore: add repo to paylod

chore: test my local repo that has master

feat: set multiline operator

chore: try to sent de pr

chore: launch enviroment in payload

feat: set the build_env

chore: add more interesting ref data

fix: solve typo in json

feat: remove / from repo path

chore: set correct head-ref without slaches

chore: send strain path

chore: return to send data withou changes

chore: debug dispathcer

chore: set last log commit

chore: set no merges

chore: checkout repo only in the main sha

chore: set log commit differnet cmd

this is somethind,a,,

chore: set the correct of the head chad

use head sha instead of merge sha

chore: fix typo

chore: fix another typo

feat: add condition for built

chore: print all

chore: crazy conditional | for if

The if key doesnt need the `{{}}`.
https://github.com/orgs/community/discussions/25641
https://hungvu.tech/advanced-github-actions-conditional-workflow

chore: set full logger

feat: set better name of variables

chore: fix missing `''`

fix: typo of `:`

fix: remove unneccesary log

build: test push image

fix: add correct property value

build: 2test push image

build: 3test push image

refactor: remove strain_env in payload

chore: always built images in sync

chore: set property via repo vars

chore: refactor strain property

chore: remove commit analysis

chore: run in each pull_request

chore: change order of condition of the action

feat: use base PAT

fix: wrong syntaxis of the if

feat: configure correct repo of strain

chore: remove personal token

use token of the action

feat: use ROBONEXT_PAT
  • Loading branch information
johanseto committed Sep 8, 2023
1 parent 0b51c8f commit df523dc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/strain_dispatcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Strain Repo Dispatch 📜
on: pull_request
#strain_property go in json_path format.
jobs:
strain-dispatch:
runs-on: ubuntu-latest
steps:
- name: Manipulate strain property if necessary
run: |
echo "STRAIN_PROPERTY=${STRAIN_PROPERTY}" >> $GITHUB_ENV # update GitHub ENV vars
env:
STRAIN_PROPERTY: ${{ vars.STRAIN_PROPERTY }}
- name: Strain Repository Dispatch
if: |
github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
(github.event.action == 'closed' && github.event.pull_request.merged)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ROBONEXT_PAT }}
repository: nelc/edx-platform-strains
event-type: strain-update-pr
client-payload: |
{
"repo": "${{ github.repository }}",
"sha": "${{ github.event.pull_request.head.sha }}",
"head_ref": "${{ github.head_ref }}",
"base_ref": "${{ github.base_ref }}",
"strain_property": "${{ env.STRAIN_PROPERTY }}",
"strain_property_value": "${{ env.PROPERTY_VALUE }}",
"strain_path": "mango/nelp/strain.yml",
"pr_number": "${{ github.event.number }}",
"pr_action": "${{ github.event.action }}"
}
env:
PROPERTY_VALUE: ${{ github.event.pull_request.merged && github.base_ref || github.head_ref }}

0 comments on commit df523dc

Please sign in to comment.