build(go): update go and project dependabot, and add buildID ineject … #190
Workflow file for this run
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
name: ci | |
on: | |
push: | |
paths-ignore: | |
- '**/README.md' | |
branches: | |
# - 'main' | |
- 'release-*' | |
- '*-feature-*' | |
- '*-enhancement-*' | |
- '*-hotfix-*' | |
- '*-bug-*' | |
- '*-documentation-*' | |
- 'BF-*' | |
- 'FE-*' | |
- 'PU-*' | |
- 'DOC-*' | |
tags: | |
- '*' # Push events to matching *, i.e. 1.0.0 v1.0, v20.15.10 | |
pull_request: | |
paths-ignore: | |
- '**/README.md' | |
types: # https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request | |
- opened | |
- reopened | |
- closed | |
# branches: | |
# - 'main' | |
# - 'release-*' | |
# - 'DOC-*' | |
# - 'hotfix-*' | |
permissions: # https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
contents: write | |
discussions: write | |
packages: write | |
jobs: | |
version: | |
name: version | |
uses: ./.github/workflows/version.yml | |
golang-ci: | |
name: golang-ci | |
needs: | |
- version | |
uses: ./.github/workflows/golang-ci.yml | |
secrets: inherit | |
# if: ${{ github.event.pull_request.merged == true }} | |
go-build-check-main: | |
name: go-build-check-main | |
needs: | |
- version | |
- golang-ci | |
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.base_ref == 'main' }} | |
uses: ./.github/workflows/go-release-platform.yml | |
secrets: inherit | |
with: | |
version_name: latest | |
go_build_id: ${{ needs.version.outputs.short_sha }} | |
# docker-buildx-bake-hubdocker-latest: | |
# name: docker-buildx-bake-hubdocker-latest | |
# needs: | |
# - version | |
# - golang-ci | |
# - go-build-check-main | |
# uses: ./.github/workflows/docker-buildx-bake-hubdocker-latest.yml | |
# # if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.base_ref == 'main' }} | |
# with: | |
# # push_remote_flag: ${{ github.ref == 'refs/heads/main' }} | |
# push_remote_flag: ${{ github.event.pull_request.merged == true }} | |
# secrets: | |
# DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" | |
go-release-platform: | |
name: go-release-platform | |
needs: | |
- version | |
- golang-ci | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: ./.github/workflows/go-release-platform.yml | |
secrets: inherit | |
with: | |
version_name: ${{ needs.version.outputs.tag_name }} | |
go_build_id: ${{ needs.version.outputs.short_sha }} | |
upload_artifact_name: go-release | |
# docker-buildx-bake-hubdocker-tag: | |
# name: docker-buildx-bake-hubdocker-tag | |
# needs: | |
# - version | |
# - golang-ci | |
# - go-release-platform | |
# uses: ./.github/workflows/docker-buildx-bake-hubdocker-tag.yml | |
# if: startsWith(github.ref, 'refs/tags/') | |
# # with: | |
# # push_remote_flag: true # default is true | |
# secrets: | |
# DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" | |
deploy-tag: | |
needs: | |
- version | |
- golang-ci | |
- go-release-platform | |
# - docker-buildx-bake-hubdocker-tag | |
name: deploy-tag | |
uses: ./.github/workflows/deploy-tag.yml | |
if: startsWith(github.ref, 'refs/tags/') | |
secrets: inherit | |
with: | |
dry_run: false # open/close dry run | |
prerelease: true | |
tag_name: ${{ needs.version.outputs.tag_name }} | |
tag_changes: ${{ needs.version.outputs.cc_changes }} | |
download_artifact_name: go-release # download artifact name, download from actions/upload-artifact, as: {download_artifact_name}-{tag_name}-*, empty is not download |