Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: improvements to the composite action + document it. #29

Merged
merged 2 commits into from
Feb 16, 2024
Merged
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
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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -32,9 +32,9 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version-file: 'go.mod'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
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/[email protected]
- 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
Loading