Skip to content
This repository was archived by the owner on Mar 4, 2021. It is now read-only.
This repository was archived by the owner on Mar 4, 2021. It is now read-only.

Tag created on wrong commit #111

Description

@dbrekelmans

Expected behaviour
Tags the last commit

Actual behaviour
The commit before the last commit is tagged

Context
I have a workflow that makes a new commit & push and then creates a new release.

For full workflow, see: https://github.com/dbrekelmans/bdi/blob/0.3-alpha.1/.github/workflows/release.yml

The relevant part is:

      - name: Commit assets
        id: commit
        uses: EndBug/add-and-commit@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          message: "Update PHAR distribution to ${{ github.event.client_payload.tag_name }}"
      - name: Wait for git push
        uses: jakejarvis/wait-action@master
        with:
          time: '5s' # Wait for git push to be finished
      - uses: actions/create-release@v1
        if: success() && steps.commit.outputs.committed && steps.commit.outputs.pushed
        with:
          tag_name: ${{ github.event.client_payload.tag_name }}
          release_name: ${{ github.event.client_payload.release_name }}
          prerelease: ${{ github.event.client_payload.prerelease }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

As you can see, I've added a wait action for 5 seconds, but this did not resolve the issue.
I suspect that the last commit is fetched when the container is built at the start of the job, not when the container is run.
In any case, this action doesn't see the commit that was made with EndBug/add-and-commit@v5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions