mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-05-16 14:16:45 +00:00
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: public-cli
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
- main
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Set up Cloud SDK
|
|
uses: google-github-actions/setup-gcloud@master
|
|
with:
|
|
service_account_key: ${{ secrets.GCR_JSON_KEY }}
|
|
export_default_credentials: true
|
|
- uses: haya14busa/action-cond@v1
|
|
id: condval
|
|
with:
|
|
cond: ${{ github.ref == 'refs/heads/main' }}
|
|
if_true: "patch"
|
|
if_false: "prepatch"
|
|
- name: Auto Increment Semver Action
|
|
uses: MCKanpolat/auto-semver-action@1.0.5
|
|
id: versioning
|
|
with:
|
|
releaseType: ${{ steps.condval.outputs.value }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Get base image name
|
|
shell: bash
|
|
run: |
|
|
echo "##[set-output name=build_timestamp;]$(echo $(date +%s))"
|
|
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
id: version_parameters
|
|
- name: Build and Push CLI
|
|
run: make push-cli SEM_VER='${{ steps.versioning.outputs.version }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}'
|
|
- name: publish
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
artifacts: "cli/bin/*"
|
|
commit: ${{ steps.version_parameters.outputs.branch }}
|
|
tag: ${{ steps.versioning.outputs.version }}
|
|
prerelease: ${{ github.ref != 'refs/heads/main' }}
|
|
bodyFile: 'cli/bin/checksums.txt' |