Skip to content

Commit ac23bb3

Browse files
Use OVAL_PROCESSOR_SECRET to clone oval-processor in actions (#1112)
Ignore tests/test_oval in preflight workflow because the oval processor repo can't be cloned when the PR is coming from a fork. Fixes: AlmaLinux/build-system#429
1 parent ba5d39a commit ac23bb3

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/preflight.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ jobs:
4848
repository: AlmaLinux/albs-sign-file
4949
path: albs-sign-file
5050

51-
- name: Checkout oval-processor
52-
uses: actions/checkout@v4
53-
with:
54-
repository: AlmaLinux/oval-processor
55-
path: oval-processor
56-
ssh-key: ${{ secrets.OVAL_PROCESSOR_PRIVKEY }}
57-
5851
- name: Set up Docker Buildx
5952
# https://github.com/marketplace/actions/docker-setup-buildx
6053
uses: docker/setup-buildx-action@v3
@@ -125,10 +118,11 @@ jobs:
125118
bandit -c pyproject.toml ${{ steps.changed-files.outputs.src_files }} \
126119
| tee >(sed 's/\x1B\[[0-9;]*m//g' > $REPORTS_DIR/bandit-report.txt)"
127120
121+
# Run pytest ignoring tests/test_oval due to inability to clone oval-processor
128122
- name: Run pytest
129123
run: |
130124
docker compose run --rm web_server_tests bash -o pipefail -c "
131-
pytest -v --cov \
125+
pytest -v --ignore tests/test_oval --cov \
132126
--junit-xml=$REPORTS_DIR/pytest-report.xml \
133127
--cov-report=xml:$REPORTS_DIR/pytest-coverage.xml \
134128
--cov-report=term | tee $REPORTS_DIR/pytest-output.txt"

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
repository: AlmaLinux/oval-processor
3232
path: oval-processor
33-
ssh-key: ${{ secrets.OVAL_PROCESSOR_PRIVKEY }}
33+
token: ${{ secrets.OVAL_PROCESSOR_SECRET }}
3434

3535
- name: Set up Docker Buildx
3636
# https://github.com/marketplace/actions/docker-setup-buildx

0 commit comments

Comments
 (0)