Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/wc-build-push-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,24 @@ jobs:
registry: ${{ inputs.registry }}
test-file: ${{ inputs.integration-test-file }}

integration-test-podman:
name: 🧪 Podman
if: ${{ inputs.integration-test-file }}
needs: build-push
uses: ./.github/workflows/wc-integration-test-podman.yml
permissions:
contents: read
secrets:
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
with:
build-test-runner-labels: ${{ inputs.build-test-runner-labels }}
fully-qualified-image-name: ${{ needs.build-push.outputs.fully-qualified-image-name }}
image-basename: ${{ needs.build-push.outputs.image-basename }}
image-digest: ${{ needs.build-push.outputs.digest }}
registry: ${{ inputs.registry }}
test-file: ${{ inputs.integration-test-file }}

acceptance-test:
name: 🏗️
if: ${{ inputs.test-devcontainer-file && inputs.acceptance-test-path }}
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/wc-integration-test-podman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: Integration Test (Podman)

on:
workflow_call:
inputs:
build-test-runner-labels:
required: true
type: string
fully-qualified-image-name:
required: true
type: string
image-basename:
required: true
type: string
image-digest:
required: true
type: string
registry:
required: true
type: string
test-file:
required: true
type: string
secrets:
DOCKER_REGISTRY_PASSWORD:
required: true
DOCKER_REGISTRY_USERNAME:
required: true

permissions: {}

jobs:
run-test:
name: Integration Test Podman (${{ (startsWith(matrix.runner, '[') && endsWith(matrix.runner, ']')) && join(matrix.runner, ', ') || matrix.runner }})
strategy:
matrix:
runner: ${{ fromJson(inputs.build-test-runner-labels) }}
runs-on: ${{ matrix.runner }}
permissions:
contents: read
steps:
- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
disable-sudo: false
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Podman
run: |
# Install Podman on Ubuntu (Ubuntu 20.10+ has Podman in default repositories)
# This workflow is designed for Ubuntu runners (ubuntu-latest, ubuntu-24.04-arm)
sudo apt-get update
sudo apt-get install -y podman
podman --version
- name: Login to container registry
run: |
echo "${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }}" | \

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
podman login ${{ inputs.registry }} \

Check failure

Code scanning / SonarCloud

GitHub Actions should not be vulnerable to script injections High

Change this workflow to not use user-controlled data directly in a run block. See more on SonarQube Cloud

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
--username "${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }}" \

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
--password-stdin
- name: Pull container image
run: |
podman pull ${{ inputs.fully-qualified-image-name }}@${{ inputs.image-digest }}

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
- run: echo "arch=$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
id: runner-arch
- name: Run integration tests using Podman
run: |
podman run --rm \
-v "${{ github.workspace }}:${{ github.workspace }}" \

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
-w "${{ github.workspace }}" \

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
-e IMAGE_BASENAME="${IMAGE_BASENAME}" \
-e TEST_FILE="${TEST_FILE}" \
-e RUNNER_ARCH="${RUNNER_ARCH}" \
${{ inputs.fully-qualified-image-name }}@${{ inputs.image-digest }} \

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
bats --formatter junit "${TEST_FILE}" | tee "test-report-${IMAGE_BASENAME}-podman-${RUNNER_ARCH}.xml"
env:
IMAGE_BASENAME: ${{ inputs.image-basename }}
TEST_FILE: ${{ inputs.test-file }}
RUNNER_ARCH: ${{ steps.runner-arch.outputs.arch }}
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ !cancelled() }}
with:
name: test-results-integration-podman-${{ inputs.image-basename }}-${{ steps.runner-arch.outputs.arch }}
path: test-report-*.xml
Loading