no message

This commit is contained in:
Roee Gadot
2021-06-19 09:40:19 +03:00
parent 605c67c22f
commit 3567f5c00b
4 changed files with 20 additions and 18 deletions

View File

@@ -2,8 +2,9 @@ name: public-cli
on:
push:
branches:
- 'develop'
- 'main'
- 'my-temp-release-check'
# - 'develop'
# - 'main'
jobs:
docker:
runs-on: ubuntu-latest
@@ -15,20 +16,28 @@ jobs:
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=cal_ver;]$(echo $(date +'%y.%m.%d'))"
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 CAL_VER='${{ steps.version_parameters.outputs.cal_ver }}' BUILD_TIME_UTC='${{ steps.version_parameters.outputs.build_time_utc }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}'
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.cal_ver }}
tag: ${{ steps.version_parameters.outputs.version }}