summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint-with-ruff.yml (renamed from .github/workflows/lint-with-darker-ruff.yml)6
-rw-r--r--.github/workflows/package-smoketest.yml46
-rw-r--r--.github/workflows/trigger-rebuild-repo-package.yml32
3 files changed, 76 insertions, 8 deletions
diff --git a/.github/workflows/lint-with-darker-ruff.yml b/.github/workflows/lint-with-ruff.yml
index 01f7cd448..00cc9ca1b 100644
--- a/.github/workflows/lint-with-darker-ruff.yml
+++ b/.github/workflows/lint-with-ruff.yml
@@ -1,4 +1,4 @@
-name: Lint py code with darker and ruff
+name: Lint py code with ruff
on:
pull_request_target:
branches:
@@ -9,6 +9,6 @@ permissions:
contents: read
jobs:
- darker-ruff-lint:
- uses: vyos/.github/.github/workflows/lint-with-darker-ruff.yml@current
+ ruff-lint:
+ uses: vyos/.github/.github/workflows/lint-with-ruff.yml@current
secrets: inherit
diff --git a/.github/workflows/package-smoketest.yml b/.github/workflows/package-smoketest.yml
index 467ff062e..289ad70f3 100644
--- a/.github/workflows/package-smoketest.yml
+++ b/.github/workflows/package-smoketest.yml
@@ -1,7 +1,7 @@
name: VyOS ISO integration Test
on:
- pull_request:
+ pull_request_target:
branches:
- current
paths:
@@ -15,6 +15,9 @@ permissions:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments
+ BUILD_BY: autobuild@vyos.net
+ DEBIAN_MIRROR: http://deb.debian.org/debian/
+ VYOS_MIRROR: https://rolling-packages.vyos.net/current/
jobs:
build_iso:
@@ -23,9 +26,6 @@ jobs:
container:
image: vyos/vyos-build:current
options: --sysctl net.ipv6.conf.lo.disable_ipv6=0 --privileged
- env:
- BUILD_BY: autobuild@vyos.net
- DEBIAN_MIRROR: http://deb.debian.org/debian/
outputs:
build_version: ${{ steps.version.outputs.build_version }}
steps:
@@ -39,6 +39,7 @@ jobs:
path: packages/vyos-1x
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Build vyos-1x package
run: |
cd packages/vyos-1x; dpkg-buildpackage -uc -us -tc -b
@@ -52,9 +53,11 @@ jobs:
sudo --preserve-env ./build-vyos-image \
--architecture amd64 \
--build-by $BUILD_BY \
+ --build-type release \
+ --custom-package vyos-1x-smoketest \
--debian-mirror $DEBIAN_MIRROR \
--version ${{ steps.version.outputs.build_version }} \
- --build-type release \
+ --vyos-mirror $VYOS_MIRROR \
generic
- uses: actions/upload-artifact@v4
with:
@@ -154,11 +157,43 @@ jobs:
echo "exit_code=fail" >> $GITHUB_OUTPUT
fi
+ test_encrypted_config_tpm:
+ needs: build_iso
+ runs-on: ubuntu-24.04
+ timeout-minutes: 30
+ container:
+ image: vyos/vyos-build:current
+ options: --sysctl net.ipv6.conf.lo.disable_ipv6=0 --privileged
+ outputs:
+ exit_code: ${{ steps.test.outputs.exit_code }}
+ steps:
+ # We need the test script from vyos-build repo
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
+ with:
+ repository: vyos/vyos-build
+ - uses: actions/download-artifact@v4
+ with:
+ name: vyos-${{ needs.build_iso.outputs.build_version }}
+ path: build
+ - name: VyOS TPM encryption tests
+ id: test
+ shell: bash
+ run: |
+ set -e
+ sudo make testtpm
+ if [[ $? == 0 ]]; then
+ echo "exit_code=success" >> $GITHUB_OUTPUT
+ else
+ echo "exit_code=fail" >> $GITHUB_OUTPUT
+ fi
+
result:
needs:
- test_smoketest_cli
- test_config_load
- test_raid1_install
+ - test_encrypted_config_tpm
runs-on: ubuntu-24.04
timeout-minutes: 5
if: always()
@@ -177,6 +212,7 @@ jobs:
* CLI Smoketests ${{ needs.test_smoketest_cli.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }}
* Config tests ${{ needs.test_config_load.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }}
* RAID1 tests ${{ needs.test_raid1_install.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }}
+ * TPM tests ${{ needs.test_encrypted_config_tpm.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }}
message-id: "SMOKETEST_RESULTS"
allow-repeats: false
diff --git a/.github/workflows/trigger-rebuild-repo-package.yml b/.github/workflows/trigger-rebuild-repo-package.yml
new file mode 100644
index 000000000..37ec83274
--- /dev/null
+++ b/.github/workflows/trigger-rebuild-repo-package.yml
@@ -0,0 +1,32 @@
+name: Trigger to build a deb package from repo
+
+on:
+ pull_request_target:
+ types:
+ - closed
+ branches:
+ - current
+ workflow_dispatch:
+
+jobs:
+ get_repo_name:
+ runs-on: ubuntu-latest
+ outputs:
+ PACKAGE_NAME: ${{ steps.package_name.outputs.PACKAGE_NAME }}
+ steps:
+ - name: Set variables
+ id: package_name
+ run: |
+ echo "PACKAGE_NAME=$(basename ${{ github.repository }})" >> $GITHUB_OUTPUT
+
+ trigger-build:
+ needs: get_repo_name
+ uses: vyos/.github/.github/workflows/trigger-rebuild-repo-package.yml@current
+ with:
+ branch: ${{ github.ref_name }}
+ package_name: ${{ needs.get_repo_name.outputs.PACKAGE_NAME }}
+ secrets:
+ REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
+ REMOTE_REUSE_REPO: ${{ secrets.REMOTE_REUSE_REPO }}
+ GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
+ PAT: ${{ secrets.PAT }}