Skip to content

Commit

Permalink
TestVars
Browse files Browse the repository at this point in the history
  • Loading branch information
gtjoseph committed Oct 10, 2024
1 parent 3974a9b commit 15f0aa0
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 26 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/AsteriskUnitGateTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,41 @@ on:
TOKEN:
required: true

env:
GH_TOKEN: ${{ secrets.TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
ASTERISK_REPO: ${{ inputs.asterisk_repo }}
BASE_BRANCH: ${{ inputs.base_branch }}
IS_CHERRY_PICK: ${{ inputs.is_cherry_pick }}
PR_NUMBER: ${{ inputs.pr_number }}
CACHE_DIR: ${{ github.workspace }}/${{ inputs.output_cache_dir }}
REPO_DIR: ${{ github.event.repository.name }}
REPO_ORG: ${{ github.event.repository.owner.login }}
OUTPUT_DIR: ${{ github.workspace }}/${{ inputs.output_cache_dir }}/output
ACTIONS_OWNER: ${{ fromJSON(inputs.actions_ref).owner }}
ACTIONS_REPO: ${{ fromJSON(inputs.actions_ref).repo }}
ACTIONS_BRANCH: ${{ fromJSON(inputs.actions_ref).branch }}
SCRIPT_DIR: ${{ github.workspace }}/asterisk-ci-actions/scripts



jobs:
Setup:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Setup Runner
run: |
# Setup
wget -qO asterisk-ci-actions.tar.gz \
https://github.com/${ACTIONS_OWNER}/${ACTIONS_REPO}/archive/refs/heads/${ACTIONS_BRANCH}.tar.gz
tar -xf asterisk-ci-actions.tar.gz --transform="s/^${ACTIONS_REPO}-${ACTIONS_BRANCH}/asterisk-ci-actions/g"
Build:
needs: [ Setup ]
uses: ./.github/workflows/AsteriskBuildAndCache.yml
with:
actions_ref: ${{ inputs.actions_ref }}
Expand Down
51 changes: 25 additions & 26 deletions .github/workflows/TestWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,36 @@ run-name: "TestWorkflow"
on:
workflow_dispatch:

jobs:
Build:
uses: ./.github/workflows/AsteriskBuildAndCache.yml
with:
test_type: nightly
asterisk_repo: asterisk/asterisk
pr_number: 931
base_branch: master
is_cherry_pick: false
build_cache_key: ${{ github.workflow }}-931-master
secrets:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
ACTIONS_OWNER: asterisk
ACTIONS_REPO: asterisk-ci-actions
ACTIONS_BRANCH: main-test-native
SCRIPT_DIR: ${{ github.workspace }}/asterisk-ci-actions/scripts

ShowCache:
needs: [ Build ]
jobs:
Setup:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Setup Runner
uses: asterisk/asterisk-ci-actions/SetupUbuntuRunner@main-test-native
- name: Setup
run: |
# Setup
pwd
wget -qO asterisk-ci-actions.tar.gz \
https://github.com/${ACTIONS_OWNER}/${ACTIONS_REPO}/archive/refs/heads/${ACTIONS_BRANCH}.tar.gz
tar -xf asterisk-ci-actions.tar.gz --transform="s/^${ACTIONS_REPO}-${ACTIONS_BRANCH}/asterisk-ci-actions/g"
# jq -r '. | from_entries' ${ACTIONS_REPO}/.github/control/asterisk-gh-test.json
sed -i -r -e "s/^vars_/export vars_/g" ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env
source ${ACTIONS_REPO}/.github/control/asterisk-gh-test.env
for VV in ${!vars_@} ; do
echo "$VV=${!VV}" >> "${GITHUB_ENV}"
done
- name: Restore Asterisk Cache
uses: asterisk/asterisk-ci-actions/RestoreAsteriskFromCache@main
with:
repo_dir: asterisk
build_cache_dir: build-cache
build_cache_key: ${{ github.workflow }}-931-master
user_group: asteriskci:users
- name: showcache
- name: Printenv
run: |
# Show Cache
find build-cache
printenv
# - name: DumpEnvironment
# uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main

0 comments on commit 15f0aa0

Please sign in to comment.