mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-05-16 22:26:44 +00:00
43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
name: public-cli
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'my-temp-release-check'
|
|
# - '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
|
|
|
|
- name: Auto Increment Semver Action
|
|
uses: MCKanpolat/auto-semver-action@1.0.5
|
|
id: versioning
|
|
with:
|
|
releaseType: patch # TODO: should be by branch master=minor other=patch
|
|
incrementPerCommit: false
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get base image name
|
|
shell: bash
|
|
run: |
|
|
echo "##[set-output name=build_time_utc;]$(echo $(date -u))"
|
|
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_TIME_UTC='${{ steps.version_parameters.outputs.build_time_utc }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}'
|
|
- if: github.ref == 'refs/heads/main'
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
artifacts: "cli/bin/*"
|
|
commit: ${{ steps.version_parameters.outputs.branch }}
|
|
tag: ${{ steps.version_parameters.outputs.version }} |