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.

Tags point at wrong commit #31

@fleskesvor

Description

@fleskesvor

My use-case is that I need to create release assets for every commit, across all branches, so this action seems ideal. However, when using it on branches, I've noticed that every tag ends up pointing at master HEAD, even though I've verified in an earlier step that the commit checked out by actions/checkout@v1 is in fact pointing at a commit on my branch.

Additionally, I'm trying to set the body to github.event.commits[0].message, and according to the output from the job, it is set to the correct commit message, but when I look at the list of releases in my repo, it has somehow been set to the commit message of master HEAD instead.

My pipeline looks like this:

    steps:
      - uses: actions/checkout@v1
      - id: artifact-version
        uses: fleskesvor/actions-test/actions/create-artifact-version@master
      - name: Test artifact version
        run: |
          echo "VERSION: ${VERSION}"
          echo "COMMIT MESSAGE: ${MESSAGE}"
          git log -1
        env:
          VERSION: ${{ steps.artifact-version.outputs.version }}
          MESSAGE: ${{ github.event.commits[0].message }}
      - id: github-release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ steps.artifact-version.outputs.version }}
          release_name: ${{ steps.artifact-version.outputs.version }}
          body: ${{ github.event.commits[0].message }}

Where fleskesvor/actions-test/actions/create-artifact-version@master is just a crude, custom made action to set a version/tag on a specific format.

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