Test "Workaround" for 'quotes' in commit message. #174
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Drainpipe Dev Package | |
on: | |
push: | |
branches: | |
- 460-drainpipe-dev-use-deploy-token | |
- main | |
tags: | |
- 'v*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name || github.sha }} | |
cancel-in-progress: false | |
permissions: | |
contents: read | |
jobs: | |
Drainpipe-Dev: | |
name: Push branch to drainpipe-dev | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add drainpipe-dev deploy key in order to run git clone | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }} | |
log-public-key: false | |
# @todo This step might need to be re-worked to checkout to a different directory and copy the contents over instead of doing a reset. Not sure that will work with deleted files. | |
- name: Create git checkout of drainpipe-dev | |
working-directory: drainpipe-dev | |
run: | | |
git init | |
git branch -m ${{ github.ref_name }} | |
git remote add origin [email protected]:Lullabot/drainpipe-dev.git | |
git fetch origin | |
git reset --mixed origin/${{ github.ref_name }} | |
git config user.email "[email protected]" | |
git config user.name "Drainpipe Bot" | |
- name: Push branch to drainpipe-dev | |
if: ${{ startsWith(github.ref, 'refs/heads/') }} | |
working-directory: drainpipe-dev | |
run: | | |
git add -A | |
git commit -m "$COMMIT_MESSAGE" --allow-empty | |
git push origin ${{ github.ref_name }} | |
env: | |
# Workaround if the commit message contains quotes. | |
COMMMIT_MESSAEG: ${{ github.event.head_commit.message }} | |
- name: Push tag to drainpipe-dev | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
working-directory: drainpipe-dev | |
run: | | |
git tag ${{ github.ref_name }} | |
git push origin ${{ github.ref_name }} |