-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(gha): add a workflow to build and test
Signed-off-by: Kaan Yagci <[email protected]>
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Ensure version increment | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- cli/*$ | ||
- core/** | ||
- docker-plugins/** | ||
- example/** | ||
concurrency: | ||
group: "${{ github.workflow_ref }} - ${{ github.ref }} - ${{ github.event_name }}" | ||
cancel-in-progress: true | ||
jobs: | ||
build_cli: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Go 1.22.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22.x" | ||
- name: Build the CLI | ||
run: make build | ||
build_plugins: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Go 1.22.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22.x" | ||
- name: Build Docker plugins | ||
run: make build-plugins | ||
test_docker_plugins: | ||
runs-on: ubuntu-latest | ||
needs: build_plugins | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Go 1.22.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22.x" | ||
- name: Create plugins directory | ||
run: mkdir -p ~/.docker/cli-plugins/ | ||
- name: Build Docker plugins | ||
run: make install-plugins | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [build_cli, build_plugins] | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Go 1.22.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Test | ||
run: make test | ||
|
||
|