chore(ci): remove get_release_id task #483

Closed
luke wants to merge 1 commits from rel-flow into main
Owner

Explanation of Code Changes in release.yml

This commit proposes changes to the .gitea/workflows/release.yml file, specifically commenting out the get_release_id job and modifying the needs dependency of the create_docker job.

Here's a breakdown:

  1. Commenting out the get_release_id job:

    --- a/.gitea/workflows/release.yml
    +++ b/.gitea/workflows/release.yml
    @@ -23,26 +23,26 @@ jobs:
         secrets:
           ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
    
    -  get_release_id:
    -    name: Get Release ID
    -    runs-on: ubuntu-latest
    -    needs: [tag, create_release]
    -    outputs:
    -      releaseid: ${{ steps.getid.outputs.releaseid }}
    -    steps:
    -      - name: Get Release ID
    -        id: getid
    -        run: |
    -          rid=$(curl -s -X 'GET' \
    -          -H 'accept: application/json' \
    -          '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
    -          echo "releaseid=$rid" >> "$GITEA_OUTPUT"
    -          echo "$rid"
    +  # get_release_id:
    +  #   name: Get Release ID
    +  #   runs-on: ubuntu-latest
    +  #   needs: create_release
    +  #   outputs:
    +  #     releaseid: ${{ steps.getid.outputs.releaseid }}
    +  #   steps:
    +  #     - name: Get Release ID
    +  #       id: getid
    +  #       run: |
    +  #         rid=$(curl -s -X 'GET' \
    +  #         -H 'accept: application/json' \
    +  #         '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
    +  #         echo "releaseid=$rid" >> "$GITEA_OUTPUT"
    +  #         echo "$rid"
    
    • The entire get_release_id job is now commented out using #. This means the job will no longer be executed as part of the workflow.
    • The get_release_id job was designed to fetch the ID of the latest release using a curl command to the Gitea API and store it in the releaseid output.
    • The needs field specified that this job depended on the tag and create_release jobs being completed successfully before it could run.
  2. Modifying create_docker job's needs dependency:

    --- a/.gitea/workflows/release.yml
    +++ b/.gitea/workflows/release.yml
    @@ -51,7 +51,7 @@
    
     create_docker:
       name: Publish Docker Images
       runs-on: ubuntu-latest
    -  needs: tag
    +  needs: create_release
       steps:
         - name: Update Docker configuration
           continue-on-error: true
    
    • The needs field in the create_docker job has been changed from tag to create_release.
    • Previously, the create_docker job would only run after the tag job completed. Now, it will only run after the create_release job completes.

Impact and Justification (Inferred):

  • get_release_id removal: It seems the releaseid obtained by the get_release_id job is no longer necessary or is being obtained in a different way. Perhaps the release ID is now directly available within the create_docker job's environment after the create_release job completes, or it's no longer a required input to the create_docker job.
  • create_docker dependency change: The change to the create_docker's needs suggests that the Docker image creation and publishing process now directly relies on the release being created rather than just a tag being available. This makes logical sense since docker images are often associated to specific releases.

In summary, the commit streamlines the release workflow by removing an apparently redundant job (get_release_id) and adjusting the dependency chain to ensure that the Docker image creation is tied directly to the creation of a release.

## Explanation of Code Changes in `release.yml` This commit proposes changes to the `.gitea/workflows/release.yml` file, specifically commenting out the `get_release_id` job and modifying the `needs` dependency of the `create_docker` job. **Here's a breakdown:** 1. **Commenting out the `get_release_id` job:** ```diff --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,26 +23,26 @@ jobs: secrets: ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }} - get_release_id: - name: Get Release ID - runs-on: ubuntu-latest - needs: [tag, create_release] - outputs: - releaseid: ${{ steps.getid.outputs.releaseid }} - steps: - - name: Get Release ID - id: getid - run: | - rid=$(curl -s -X 'GET' \ - -H 'accept: application/json' \ - '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id') - echo "releaseid=$rid" >> "$GITEA_OUTPUT" - echo "$rid" + # get_release_id: + # name: Get Release ID + # runs-on: ubuntu-latest + # needs: create_release + # outputs: + # releaseid: ${{ steps.getid.outputs.releaseid }} + # steps: + # - name: Get Release ID + # id: getid + # run: | + # rid=$(curl -s -X 'GET' \ + # -H 'accept: application/json' \ + # '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id') + # echo "releaseid=$rid" >> "$GITEA_OUTPUT" + # echo "$rid" ``` * The entire `get_release_id` job is now commented out using `#`. This means the job will no longer be executed as part of the workflow. * The `get_release_id` job was designed to fetch the ID of the latest release using a `curl` command to the Gitea API and store it in the `releaseid` output. * The `needs` field specified that this job depended on the `tag` and `create_release` jobs being completed successfully before it could run. 2. **Modifying `create_docker` job's `needs` dependency:** ```diff --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -51,7 +51,7 @@ create_docker: name: Publish Docker Images runs-on: ubuntu-latest - needs: tag + needs: create_release steps: - name: Update Docker configuration continue-on-error: true ``` * The `needs` field in the `create_docker` job has been changed from `tag` to `create_release`. * Previously, the `create_docker` job would only run after the `tag` job completed. Now, it will only run after the `create_release` job completes. **Impact and Justification (Inferred):** * **`get_release_id` removal:** It seems the `releaseid` obtained by the `get_release_id` job is no longer necessary or is being obtained in a different way. Perhaps the release ID is now directly available within the `create_docker` job's environment after the `create_release` job completes, or it's no longer a required input to the `create_docker` job. * **`create_docker` dependency change:** The change to the `create_docker`'s `needs` suggests that the Docker image creation and publishing process now directly relies on the release being created rather than just a tag being available. This makes logical sense since docker images are often associated to specific releases. In summary, the commit streamlines the release workflow by removing an apparently redundant job (`get_release_id`) and adjusting the dependency chain to ensure that the Docker image creation is tied directly to the creation of a release.
luke added 1 commit 2025-05-10 22:03:29 +02:00
chore(ci): remove get_release_id task
All checks were successful
Enforce Conventional Commit PR Title / Validate PR Title (pull_request_target) Successful in 21s
CI / ci (pull_request) Successful in 4m59s
cd2ef4959d
Member

Decision: Reject
Change Score: 2/10

You are commenting out the get_release_id job in your workflow. This job appears to be responsible for fetching the release ID from the Gitea API, which is likely used in subsequent steps. Removing this job without a clear reason or alternative implementation will break the workflow. And the needs of create_docker are changed to create_release from tag, but there's no corresponding reason why it has to be changed.

I cannot accept this change. Please provide a valid reason why you are removing this job.

**Decision: Reject** **Change Score: 2/10** You are commenting out the `get_release_id` job in your workflow. This job appears to be responsible for fetching the release ID from the Gitea API, which is likely used in subsequent steps. Removing this job without a clear reason or alternative implementation will break the workflow. And the needs of `create_docker` are changed to `create_release` from `tag`, but there's no corresponding reason why it has to be changed. I cannot accept this change. Please provide a valid reason why you are removing this job.
luke closed this pull request 2025-05-10 22:08:24 +02:00
All checks were successful
Enforce Conventional Commit PR Title / Validate PR Title (pull_request_target) Successful in 21s
Required
Details
CI / ci (pull_request) Successful in 4m59s
Required
Details

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: repos/webexmemebot#483
No description provided.