Automated releases when Forgejo is published #967
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Question
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Help wanted
Status
In progress
Status
Need More Info
Status
Needs feedback
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo-helm/forgejo-helm#967
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Forgejo release process could notify the helm chart that a release was published, in the same way to already does for the mirror, by adding a tag to an issue. And that could trigger the new chart release process so it is fully automated.
This is what the Forgejo release process could do:
- name: get trigger mirror issueid: mirroruses: https://code.forgejo.org/infrastructure/issue-action/get@v1.1.0with:forgejo: https://code.forgejo.orgrepository: forgejo/forgejolabels: mirror-trigger- name: trigger the mirroruses: https://code.forgejo.org/infrastructure/issue-action/set@v1.1.0with:forgejo: https://code.forgejo.orgrepository: forgejo/forgejotoken: ${{ secrets.LABEL_ISSUE_FORGEJO_MIRROR_TOKEN }}numbers: ${{ steps.mirror.outputs.numbers }}label-wait-if-exists: 3600label: triggerAnd the forgejo-helm workflow would looks like this. When an issue is labeled:
issues:types:- labeledIf it is assigned to the right user and has the expected label, it prepares and publishes the release.
if: contains(github.event.issue.assignees.*.login, 'forgejo-read-only-issues') && github.event.label.name == 'trigger'When it is done, it clears the label.
- name: clear the trigger labelif: always()uses: https://code.forgejo.org/infrastructure/issue-action/set@v1.0.0with:forgejo: https://${{ vars.DESTINATION }}repository: ${{ vars.OWNER }}/forgejotoken: ${{ secrets.LABEL_ISSUE_FORGEJO_MIRROR_TOKEN }}numbers: ${{ github.event.issue.number }}unlabel: triggerUsed in this way the label being set acts as an exclusive lock and guarantees no two releases are built simultaneously.