Ensure checkout@v2 does not persist creds #4
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
| on: | ||
| workflow_call: | ||
| inputs: | ||
| architecture: | ||
| required: true | ||
| type: string | ||
| description: Architecture string, for example aarch64 | ||
| runner: | ||
| required: true | ||
| type: string | ||
| description: The runner to execute the build on, for example ubuntu-latest | ||
| workflow_dispatch: | ||
| inputs: | ||
| architecture: | ||
| required: true | ||
| type: string | ||
| description: Architecture string, for example aarch64 | ||
| runner: | ||
| required: true | ||
| type: string | ||
| description: The runner to execute the build on, for example ubuntu-latest | ||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ${{ inputs.runner }} | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Configure System | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y qemu-user-static | ||
| env: | ||
| DEBIAN_FRONTEND: noninteractive | ||
| - name: Test Formatting | ||
| run: make test-format ARCH=${{inputs.architecture}} | ||
| - name: Test Build | ||
| run: make build ARCH=${{inputs.architecture}} | ||
| - name: Test Packaging | ||
| run: make package ARCH=${{inputs.architecture}} | ||
| - name: Test for source differences post-build | ||
| run: git diff --exit-code | ||
| - name: Set Version | ||
| id: version-generator | ||
| run: echo "ELASTIC_EBPF_VERSION=$(cat VERSION)" >> "$GITHUB_OUTPUT" | ||
| - name: Set Path | ||
| id: path-generator | ||
| run: echo "PWD=$(pwd)" >> "$GITHUB_OUTPUT" | ||
| - name: Archive Build Artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: elastic-ebpf-${{ inputs.architecture }} | ||
| path: ${{ steps.path-generator.outputs.PWD }}/artifacts-${{ inputs.architecture }}/elastic-ebpf-${{ steps.version-generator.outputs.ELASTIC_EBPF_VERSION }}-SNAPSHOT.tar.gz | ||
| if-no-files-found: error | ||
| retention-days: 3 | ||