diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efb9c51..6927621 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,8 @@ jobs: name: build syscalls-bumper runs-on: ubuntu-latest steps: - - name: Checkout libs ⤵️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: falcosecurity/libs path: ${{ github.workspace }}/libs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fc728b..a0c6df3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - + - name: Checkout uses: actions/checkout@v4 with: diff --git a/README.md b/README.md index df04d02..82e251a 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,18 @@ syscalls-bumper -h -verbose enable verbose logging ``` + +## CI Usage + +To better suit the CI usage, a [Github composite action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) has been developed. +Therefore, running syscalls-bumper in your Github workflow is as easy as adding this step: +``` +- name: Bump syscalls + uses: falcosecurity/syscalls-bumper@main + with: + # Path to the libs repo. + # No default. Mandatory. + repo-root: 'true' +``` + +> __NOTE:__ Since we don't use annotated tags, one cannot use eg: falcosecurity/syscalls-bumper@v0, but only either exact tag name, branch name or commit hash. diff --git a/action.yml b/action.yml index f57a0cf..56e09a6 100644 --- a/action.yml +++ b/action.yml @@ -9,21 +9,19 @@ inputs: runs: using: "composite" steps: - - uses: robinraju/release-downloader@v1.8 + - name: Setup Go + uses: actions/setup-go@v4 with: - fileName: syscalls-bumper_*_linux_amd64.tar.gz - tarBall: false - zipBall: false - extract: true - latest: true - repository: "falcosecurity/syscalls-bumper" - - - name: Bump syscalls + go-version-file: "${{ github.action_path }}/go.mod" + + - name: Build tool shell: bash + working-directory: ${{ github.action_path }} run: | - ./syscalls-bumper --repo-root ${{ inputs.repo-root }} --overwrite - - - name: Cleanup + make build + + - name: Bump syscalls shell: bash + working-directory: ${{ github.action_path }} run: | - rm -rf syscalls-bumper* + ./build/syscalls-bumper --repo-root ${{ inputs.repo-root }} --overwrite