chore(ci): clean up release workflow
This commit is contained in:
parent
14ee2bca3a
commit
e1bc246e10
@ -24,22 +24,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
curl -X DELETE -H "Authorization: token ${{ gitea.token }}" "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/comments/${{ gitea.event.comment.id }}"
|
curl -X DELETE -H "Authorization: token ${{ gitea.token }}" "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/comments/${{ gitea.event.comment.id }}"
|
||||||
|
|
||||||
# get_last_tag:
|
|
||||||
# name: Get last tag
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: check_manual_trigger
|
|
||||||
# outputs:
|
|
||||||
# last_tag: ${{ steps.last_tag.outputs.last_tag }}
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4.2.2
|
|
||||||
# with:
|
|
||||||
# fetch-depth: 0
|
|
||||||
# - name: Get last tag
|
|
||||||
# id: last_tag
|
|
||||||
# run: |
|
|
||||||
# LASTTAG=$(git describe --tags --abbrev=0)
|
|
||||||
# echo "last_tag=$LASTTAG" >> "$GITEA_OUTPUT"
|
|
||||||
|
|
||||||
# test:
|
# test:
|
||||||
# name: Unit Test
|
# name: Unit Test
|
||||||
# uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@main
|
# uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@main
|
||||||
@ -49,7 +33,6 @@ jobs:
|
|||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# needs: test
|
# needs: test
|
||||||
# needs: get_last_tag
|
|
||||||
outputs:
|
outputs:
|
||||||
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
success: ${{ steps.set_flag.outputs.success }}
|
||||||
@ -90,28 +73,6 @@ jobs:
|
|||||||
if: steps.changes.outputs.changes == 'false'
|
if: steps.changes.outputs.changes == 'false'
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
# - name: Create changelog
|
|
||||||
# id: create_changelog
|
|
||||||
# if: steps.changes.outputs.changes == true
|
|
||||||
# run: |
|
|
||||||
# rm -f .changelog
|
|
||||||
# if [[ -z $(grep '[^[:space:]]' .changes_feat) ]] ; then
|
|
||||||
# printf "## 🚀 Features" > .changelog
|
|
||||||
# cat .changes_feat >> .changelog
|
|
||||||
# fi
|
|
||||||
# if [[ -z $(grep '[^[:space:]]' .changes_fix) ]] ; then
|
|
||||||
# printf "## 🐛 Bug Fixes" >> .changelog
|
|
||||||
# cat .changes_fix >> .changelog
|
|
||||||
# fi
|
|
||||||
# if [[ -z $(grep '[^[:space:]]' .changes_dep) ]] ; then
|
|
||||||
# printf "## 📦 Dependencies" >> .changelog
|
|
||||||
# cat .changes_dep >> .changelog
|
|
||||||
# fi
|
|
||||||
# if [[ -z $(grep '[^[:space:]]' .changes_other) ]] ; then
|
|
||||||
# printf "## 💬 Other" >> .changelog
|
|
||||||
# cat .changes_other >> .changelog
|
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Set server URL
|
- name: Set server URL
|
||||||
id: set_srvurl
|
id: set_srvurl
|
||||||
run: |
|
run: |
|
||||||
@ -134,35 +95,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
run: |
|
run: |
|
||||||
curl -X POST \
|
curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \
|
-d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
|
||||||
|
|
||||||
# - name: Create release
|
|
||||||
# id: create_release
|
|
||||||
# uses: akkuman/gitea-release-action@v1
|
|
||||||
# env:
|
|
||||||
# NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
|
||||||
# with:
|
|
||||||
# tag: ${{ steps.get_next_version.outputs.tag }}
|
|
||||||
# name: ${{ steps.get_next_version.outputs.tag }}
|
|
||||||
# # body_path: .changelog
|
|
||||||
# body: ${{ steps.get_next_version.outputs.changelog }}
|
|
||||||
|
|
||||||
- name: Set success/fail flag
|
|
||||||
id: set_flag
|
|
||||||
if: steps.changes.outputs.changes == 'true'
|
|
||||||
run: if test "${{ steps.changes.outputs.changes }}" = "true"; then echo "success=true" >> "$GITEA_OUTPUT"; else echo "success=false" >> "$GITEA_OUTPUT"; fi
|
|
||||||
|
|
||||||
build_docker_ghcr:
|
build_docker_ghcr:
|
||||||
name: Build GHCR Docker Images
|
name: Build GHCR Docker Images
|
||||||
needs: create_release
|
needs: create_release
|
||||||
if: ${{ needs.create_release.outputs.success == 'true' }}
|
|
||||||
outputs:
|
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
|
||||||
with:
|
with:
|
||||||
release: ${{ needs.create_release.outputs.release_name }}
|
release: ${{ needs.create_release.outputs.release_name }}
|
||||||
steps:
|
steps:
|
||||||
@ -205,16 +147,9 @@ jobs:
|
|||||||
subject-digest: ${{ steps.build_push.outputs.digest }}
|
subject-digest: ${{ steps.build_push.outputs.digest }}
|
||||||
push-to-registry: true
|
push-to-registry: true
|
||||||
|
|
||||||
- name: Set success flag
|
|
||||||
id: set_flag
|
|
||||||
run: echo "success=true" >> "$GITEA_OUTPUT"
|
|
||||||
|
|
||||||
build_docker_gitea:
|
build_docker_gitea:
|
||||||
name: Build Gitea Docker Images
|
name: Build Gitea Docker Images
|
||||||
needs: create_release
|
needs: create_release
|
||||||
if: ${{ needs.create_release.outputs.success == 'true' }}
|
|
||||||
outputs:
|
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
|
||||||
with:
|
with:
|
||||||
release: ${{ needs.create_release.outputs.release_name }}
|
release: ${{ needs.create_release.outputs.release_name }}
|
||||||
steps:
|
steps:
|
||||||
@ -245,7 +180,3 @@ jobs:
|
|||||||
- name: Push Gitea image(s)
|
- name: Push Gitea image(s)
|
||||||
run:
|
run:
|
||||||
docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ inputs.release }}
|
docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ inputs.release }}
|
||||||
|
|
||||||
- name: Set success flag
|
|
||||||
id: set_flag
|
|
||||||
run: echo "success=true" >> "$GITEA_OUTPUT"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user