Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/sultan-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: push
Copy link

@OmarIthawi OmarIthawi Jul 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you case you've forgot to run it on pull_request. The syntax below means that the ci will run on every pull request, in addition to push on the juniper branch.

This means that a PR merge, will trigger another build that allows us to actually save the image instead of just testing the pipeline.

Suggested change
on: push
on:
pull_request:
push:
branches:
- juniper

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triggering on pull_request won't allow us to fetch the branch name. Push actually works on merge too. Here's a proof:

Screen Shot 2021-07-10 at 9 54 21 AM


name: 'Sultan Tests'

jobs:
sultan:
name: Trigger Sultan Action
runs-on: ubuntu-latest
steps:
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Sultan Dispatch
uses: ahmedaljazzar/dispatch-workflow@v0.1.2
with:
owner: appsembler
repo: sultan
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event_type: devstack
client_payload: '{"branch": "${{ steps.extract_branch.outputs.branch }}", "sha": "${{ github.sha }}"}'
max_time: 1500