fix(ci): correctly retrieve release name
This commit is contained in:
parent
e1bc246e10
commit
c946991eb2
@ -6,7 +6,8 @@ on:
|
|||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_manual_trigger:
|
manual_trigger:
|
||||||
|
name: Manual Trigger Cleanup
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ gitea.event_name == 'issue_comment' }}
|
if: ${{ gitea.event_name == 'issue_comment' }}
|
||||||
steps:
|
steps:
|
||||||
@ -22,7 +23,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Delete issue comment
|
- name: Delete issue comment
|
||||||
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 }}"
|
||||||
|
|
||||||
# test:
|
# test:
|
||||||
# name: Unit Test
|
# name: Unit Test
|
||||||
@ -37,7 +40,8 @@ jobs:
|
|||||||
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 }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@ -105,12 +109,12 @@ jobs:
|
|||||||
build_docker_ghcr:
|
build_docker_ghcr:
|
||||||
name: Build GHCR Docker Images
|
name: Build GHCR Docker Images
|
||||||
needs: create_release
|
needs: create_release
|
||||||
with:
|
|
||||||
release: ${{ needs.create_release.outputs.release_name }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.release }}
|
fetch-depth: 0
|
||||||
|
ref: ${{ needs.create_release.outputs.release_name }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -127,7 +131,7 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/luketainton/webexmemebot
|
images: ghcr.io/luketainton/webexmemebot
|
||||||
tags: type=semver,pattern=v{{version}},value=${{ inputs.release }}
|
tags: type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }}
|
||||||
|
|
||||||
- name: Build and push images
|
- name: Build and push images
|
||||||
id: build_push
|
id: build_push
|
||||||
@ -138,7 +142,7 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/luketainton/webexmemebot:latest
|
ghcr.io/luketainton/webexmemebot:latest
|
||||||
ghcr.io/luketainton/webexmemebot:${{ inputs.release }}
|
ghcr.io/luketainton/webexmemebot:${{ needs.create_release.outputs.release_name }}
|
||||||
|
|
||||||
- name: Generate artifact attestation
|
- name: Generate artifact attestation
|
||||||
uses: actions/attest-build-provenance@v2
|
uses: actions/attest-build-provenance@v2
|
||||||
@ -150,12 +154,12 @@ jobs:
|
|||||||
build_docker_gitea:
|
build_docker_gitea:
|
||||||
name: Build Gitea Docker Images
|
name: Build Gitea Docker Images
|
||||||
needs: create_release
|
needs: create_release
|
||||||
with:
|
|
||||||
release: ${{ needs.create_release.outputs.release_name }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.release }}
|
fetch-depth: 0
|
||||||
|
ref: ${{ needs.create_release.outputs.release_name }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@ -175,8 +179,8 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest
|
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest
|
||||||
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ inputs.release }}
|
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.create_release.outputs.release_name }}
|
||||||
|
|
||||||
- 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 }}:${{ needs.create_release.outputs.release_name }}
|
||||||
|
Loading…
Reference in New Issue
Block a user