Skip to content

Commit

Permalink
test release1
Browse files Browse the repository at this point in the history
  • Loading branch information
dengbo committed May 20, 2024
1 parent e882403 commit cbb5b5a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/release.yaml
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# README TITLE

blabla...
Empty file added RELEASE.md
Empty file.

0 comments on commit cbb5b5a

Please sign in to comment.