-
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.
- Loading branch information
dengbo
committed
May 20, 2024
1 parent
e882403
commit cbb5b5a
Showing
3 changed files
with
70 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,67 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/metadata-action@v5 | ||
id: meta | ||
with: | ||
images: ${{ github.repository_owner }}/hipibo-test-release | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=ref,event=tag | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- uses: docker/login-action@v3 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
# - uses: docker/build-push-action@v5 | ||
# with: | ||
# platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
# push: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
# context: . | ||
- uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
repository: "${{ github.repository_owner }}/hipibo-test-release" | ||
readme-filepath: ./README.md | ||
short-description: "hipibo test release desc." | ||
- id: prerelease | ||
run: | | ||
if echo "${{ github.ref_name }}" |egrep -q "^[0-9]+.[0-9]+.[0-9]+$"; then | ||
echo "::set-output name=prerelease::false" | ||
else | ||
echo "::set-output name=prerelease::true" | ||
fi | ||
- uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: ${{ steps.prerelease.outputs.prerelease }} | ||
generate_release_notes: true | ||
## When you use the repository's GITHUB_TOKEN to perform tasks, | ||
## events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, | ||
## will not create a new workflow run. | ||
## This prevents you from accidentally creating recursive workflow runs. | ||
## More info: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow | ||
# token: ${{ github.token }} | ||
token: ${{ secrets.CI_GIT_TOKEN }} | ||
name: Test ${{ github.ref_name }} Released | ||
body_path: RELEASE.md |
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,3 @@ | ||
# README TITLE | ||
|
||
blabla... |
Empty file.