Skip to content

Commit c9447b9

Browse files
authored
Update caller.yml
1 parent a223b15 commit c9447b9

File tree

1 file changed

+56
-14
lines changed

1 file changed

+56
-14
lines changed

.github/workflows/caller.yml

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Caller Test
1+
name: VyOS ISO Integration Test
22

33
on:
44
workflow_dispatch:
@@ -25,17 +25,59 @@ permissions:
2525
pull-requests: write
2626
contents: read
2727

28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
BUILD_BY: autobuild@vyos.net
31+
DEBIAN_MIRROR: http://deb.debian.org/debian/
32+
DEBIAN_SECURITY_MIRROR: http://deb.debian.org/debian-security
33+
2834
jobs:
29-
call-current:
30-
if: >
31-
(github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == 'current') ||
32-
(github.event_name != 'pull_request_target' && github.ref_name == 'current')
33-
uses: vyos/gh-action-test-vyos-1x/.github/workflows/called.yml@current
34-
secrets: inherit
35-
36-
call-circinus:
37-
if: >
38-
(github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == 'circinus') ||
39-
(github.event_name != 'pull_request_target' && github.ref_name == 'circinus')
40-
uses: vyos/gh-action-test-vyos-1x/.github/workflows/called.yml@circinus
41-
secrets: inherit
35+
set-config:
36+
runs-on: ubuntu-latest
37+
outputs:
38+
branch: ${{ steps.config.outputs.branch }}
39+
vyos_mirror: ${{ steps.config.outputs.vyos_mirror }}
40+
container_image: ${{ steps.config.outputs.container_image }}
41+
vyos_build_repo: ${{ steps.config.outputs.vyos_build_repo }}
42+
build_version_format: ${{ steps.config.outputs.build_version_format }}
43+
build_runner: ${{ steps.config.outputs.build_runner }}
44+
use_pat: ${{ steps.config.outputs.use_pat }}
45+
test_vpp: ${{ steps.config.outputs.test_vpp }}
46+
cli_test_command: ${{ steps.config.outputs.cli_test_command }}
47+
run_tpm_tests: ${{ steps.config.outputs.run_tpm_tests }}
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
52+
- name: Set branch-specific configuration
53+
id: config
54+
run: |
55+
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
56+
BRANCH="${{ github.event.pull_request.base.ref }}"
57+
else
58+
BRANCH="${{ github.ref_name }}"
59+
fi
60+
61+
CONFIG=$(jq ".branches.${BRANCH}" .github/config/smoketest-branches.json)
62+
63+
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
64+
echo "vyos_mirror=$(echo $CONFIG | jq -r .vyos_mirror)" >> $GITHUB_OUTPUT
65+
echo "container_image=$(echo $CONFIG | jq -r .container_image)" >> $GITHUB_OUTPUT
66+
echo "vyos_build_repo=$(echo $CONFIG | jq -r .vyos_build_repo)" >> $GITHUB_OUTPUT
67+
echo "build_version_format=$(echo $CONFIG | jq -r .build_version_format)" >> $GITHUB_OUTPUT
68+
echo "build_runner=$(echo $CONFIG | jq -r .build_runner)" >> $GITHUB_OUTPUT
69+
echo "use_pat=$(echo $CONFIG | jq -r .use_pat)" >> $GITHUB_OUTPUT
70+
echo "test_vpp=$(echo $CONFIG | jq -r .test_vpp)" >> $GITHUB_OUTPUT
71+
echo "cli_test_command=$(echo $CONFIG | jq -r .cli_test_command)" >> $GITHUB_OUTPUT
72+
echo "run_tpm_tests=$(echo $CONFIG | jq -r .run_tpm_tests)" >> $GITHUB_OUTPUT
73+
74+
build_iso:
75+
needs: set-config
76+
runs-on: ubuntu-latest
77+
timeout-minutes: 45
78+
steps:
79+
- name: Test
80+
run: |
81+
echo "called branch current"
82+
echo "image: ${{ needs.set-config.outputs.container_image }}"
83+
echo "run_tpm_tests: ${{ needs.set-config.outputs.run_tpm_tests }}"

0 commit comments

Comments
 (0)