Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows pushing to a branch with dynamic name #394

Closed
wants to merge 1 commit into from
Closed

Allows pushing to a branch with dynamic name #394

wants to merge 1 commit into from

Conversation

wrighbr
Copy link

@wrighbr wrighbr commented Dec 12, 2022

Allows pushing to a branch with a dynamic name this relates to issue #376

takes an output file from a task branchname and using this in params.branch

  - task: version-bump
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: node
          tag: 16.15-buster
      inputs: 
        - name: repo
      outputs:
        - name: repo
      run:
        path: sh
        args: 
          - -ec
          - |
            cd repo
   
            echo updating-to-v${NEW_VERSION}-$(date +%Y%m%d) > branchname
   
            git config user.email [email protected]
            git config user.name concourse

            echo $(date +%Y%m%d) date

            git add date
            git commit -m "updating repo"

  - put: repo-update
    params:
      repository: repo
      branch: repo/branchname

@wrighbr wrighbr closed this Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant