Skip to content

Commit

Permalink
Merge pull request #1237 from craigcomstock/ENT-9167-prime-the-pump
Browse files Browse the repository at this point in the history
ENT-9167: Added basic checkout workflow to prepare for package building in gith…
  • Loading branch information
craigcomstock authored Jul 20, 2023
2 parents eaa5956 + 585df09 commit 25e69dd
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/build-using-buildscripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build dependencies and CFEngine hub package

on:
workflow_call:
secrets:
GH_ACTIONS_SSH_DEPLOY_KEY_ENTERPRISE_REPO:
required: true
GH_ACTIONS_SSH_DEPLOY_KEY_NOVA_REPO:
required: true
GH_ACTIONS_SSH_DEPLOY_KEY_MISSION_PORTAL_REPO:
required: true

jobs:
build_cfengine_hub_package:
name: Build package and run selenium tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Together Action
uses: actions/checkout@v3
with:
repository: cfengine/together-javascript-action
ref: v1.7
ssh-key: ${{ secrets.GH_ACTIONS_SSH_DEPLOY_KEY_TOGETHER_REPO }}
ssh-known-hosts: github.com

- name: Action step
uses: ./
id: together
with:
myToken: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout Core
uses: actions/checkout@v3
with:
repository: cfengine/core
path: core
ref: ${{steps.together.outputs.core || github.base_ref}}
submodules: recursive

- name: Checkout Masterfiles
uses: actions/checkout@v3
with:
repository: cfengine/masterfiles
path: masterfiles
ref: ${{steps.together.outputs.masterfiles || github.base_ref}}

- name: Checkout Buildscripts (current project)
uses: actions/checkout@v3
with:
path: buildscripts
fetch-depth: 20

- name: Checkout Nova
uses: actions/checkout@v3
with:
repository: cfengine/nova
path: nova
ref: ${{steps.together.outputs.nova || github.base_ref}}
ssh-key: ${{ secrets.GH_ACTIONS_SSH_DEPLOY_KEY_NOVA_REPO }}
ssh-known-hosts: github.com

- name: Checkout Enterprise
uses: actions/checkout@v3
with:
repository: cfengine/enterprise
path: enterprise
ref: ${{steps.together.outputs.enterprise || github.base_ref}}
submodules: recursive
ssh-key: ${{ secrets.GH_ACTIONS_SSH_DEPLOY_KEY_ENTERPRISE_REPO }}
ssh-known-hosts: github.com

- name: Checkout Mission Portal
uses: actions/checkout@v3
with:
repository: cfengine/mission-portal
path: mission-portal
ref: ${{steps.together.outputs.mission-portal || github.base_ref}}
submodules: recursive
ssh-key: ${{ secrets.GH_ACTIONS_SSH_DEPLOY_KEY_MISSION_PORTAL_REPO }}
ssh-known-hosts: github.com
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Continuous Integration

on:
# run this workflow on pull_request activity
# this includes opening and pushing more commits
pull_request:
branches: [ master, 3.21.x, 3.18.x ]

jobs:
build_cfengine_hub_package:
uses: ./.github/workflows/build-using-buildscripts.yml
secrets: inherit

0 comments on commit 25e69dd

Please sign in to comment.