Skip to content

Commit

Permalink
cleanup: improvements to the composite action + document it.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Feb 16, 2024
1 parent a909adf commit ec4df9d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
24 changes: 11 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ec4df9d

Please sign in to comment.