packaging: fix matching clang version on older platforms #4797
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI @ AxoSyslog image | |
| on: | |
| pull_request: | |
| push: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tarball: | |
| name: Build tarball | |
| runs-on: ubuntu-latest | |
| outputs: | |
| snapshot-version: ${{ steps.snapshot-version.outputs.SNAPSHOT_VERSION }} | |
| steps: | |
| - name: Checkout AxoSyslog source | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Prepare docker image | |
| run: ./dbld/rules cache-image-tarball | |
| - name: Create source tarball | |
| run: ./dbld/rules pkg-tarball | |
| - name: Determine snapshot version | |
| id: snapshot-version | |
| run: | | |
| tarball_filename="$(find dbld/build -name '*.tar.*' -printf '%f\n')" | |
| tarball_name="${tarball_filename/\.tar.*}" | |
| tarball_version="${tarball_name/axosyslog-}" | |
| pkg_version="$(echo $tarball_version | sed -E 's|(([0-9]+\.){2}[0-9]+).*|\1|')_git$(date +%Y%m%d)" | |
| echo "SNAPSHOT_VERSION=${pkg_version}" >> $GITHUB_OUTPUT | |
| - name: Store source tarball as artifact | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: source-tarball | |
| path: dbld/build/*.tar.gz | |
| build-and-test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| needs: tarball | |
| steps: | |
| - name: Checkout AxoSyslog source | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Download source tarball artifact | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| name: source-tarball | |
| path: docker/apkbuild/axoflow/axosyslog | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v7.1.0 | |
| with: | |
| context: docker | |
| file: docker/axosyslog.dockerfile | |
| load: true | |
| tags: axosyslog:test | |
| build-args: | | |
| PKG_TYPE=snapshot | |
| SNAPSHOT_VERSION=${{ needs.tarball.outputs.snapshot-version }} | |
| - name: Smoke test | |
| env: | |
| SYSLOG_NG_IMAGE: axosyslog:test | |
| SYSLOG_NG_VERSION: ${{ needs.tarball.outputs.snapshot-version }} | |
| run: | | |
| docker/tests/smoke.sh | |
| - name: Scan docker image on CVEs | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: 'axosyslog:test' | |
| format: 'table' | |
| exit-code: '1' | |
| severity: 'CRITICAL,HIGH,MEDIUM,LOW' | |
| ignore-unfixed: true | |
| env: | |
| TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2 | |
| TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1 |