Code Monkey home page Code Monkey logo

action-push-tag's People

Contributors

micnncim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

action-push-tag's Issues

Allow force push of the tag

What you want to add

Allow force for the tag, so that we can use this for walking tags. Eg - move the "dev" tag requires:

git tag -f && git push origin -f

Why this is needed

Flexibility of this plugin for more use cases.

Bug: `fatal: not in a git directory`

What happened

Ran the actions-ecosystem/action-push-tag@v1 Github Action unsuccessfully:

...
"/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/.../...":"/github/workspace" ...
12
fatal: not in a git directory

Probably related to:
https://stackoverflow.com/questions/71849415/cannot-add-parent-directory-to-safe-directory-on-git
https://news.ycombinator.com/item?id=31009675

What you expected to happen

Successfully pushed tags.

How to reproduce it

I think if you run a workflow with the action-push-tag action this will happen.

Environment

Support the use of Deploy-Keys for push

What you want to add

Currently, GITHUB_TOKEN is used for authentication while pushing tags. This issue is for requesting a feature to support the use of deploy keys for pushing tags from the workflow.

Why this is needed

From github documentation:

When you use the repository's GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

This is a problem if the tag event is supposed to trigger any other workflows. - [Ref]
A proposed solution for this is to use the deploy keys for pushing the tag. - [Ref1], [Ref2]

Allow passing the ref to tag

What you want to add

Allow optional specification of the commit sha to tag.

Why this is needed

In case we want to tag a previous commit or move a tag.

Sometimes get the error `remote: Repository not found`

Hi!

I've been randomly getting the error remote: Repository not found when running this action. Maybe 90% of the times my action is called, it works flawlessly, but the other 10% I get this error. It's a private repo if that makes any difference.

Run actions-ecosystem/action-push-tag@v1
/usr/bin/docker run --name a33c13ea4031e03954238a09053f19aed7a50_eb1757 --label 8a33c1 --workdir /github/workspace --rm -e INPUT_TAG -e INPUT_MESSAGE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Org-Name/Repo-Name":"/github/workspace" 8a33c1:3ea4031e03954238a09053f19aed7a50
remote: Repository not found.
fatal: repository 'https://github.com/Org-Name/Repo-Name/' not found

This is my job:

  bump-version:
    needs:
      - unit-test
      - integration-test
    name: 'Bump Version on main'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - uses: actions-ecosystem/[email protected]
        id: get-merged-pr
        name: Get Merged Pull Request
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

      - uses: actions-ecosystem/action-release-label@v1
        id: release-label
        if: ${{ github.event.pull_request.merged == true }}
        with:
          label_prefix: ''
          labels: ${{ steps.get-merged-pr.labels }}

      - uses: actions-ecosystem/action-get-latest-tag@v1
        id: get-latest-tag
        if: ${{ steps.release-label.outputs.level != null }}

      - uses: actions-ecosystem/action-bump-semver@v1
        id: bump-semver
        if: ${{ steps.release-label.outputs.level != null }}
        with:
          current_version: ${{ steps.get-latest-tag.outputs.tag }}
          level: ${{ steps.release-label.outputs.level }}

      - uses: actions-ecosystem/action-push-tag@v1
        if: ${{ steps.release-label.outputs.level != null }}
        with:
          tag: ${{ steps.bump-semver.outputs.new_version }}
          message: '${{ steps.bump-semver.outputs.new_version }}: PR (#${{ github.event.pull_request.number }}) ${{ github.git-merged-pr.title }}'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.