update-content-node #13
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: Update Content Node Version | |
on: | |
workflow_dispatch: | |
inputs: | |
commit_hash: | |
description: 'Commit hash to update to' | |
required: true | |
repository_dispatch: | |
types: [update-content-node] | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Update docker-compose.yml | |
run: | | |
COMMIT_HASH="${{ github.event.inputs.commit_hash || github.event.client_payload.commit_hash }}" | |
sed -i "s|earthfast/content-node:.*|earthfast/content-node:${COMMIT_HASH}|g" content-node/docker-compose/docker-compose.yml | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add content-node/docker-compose/docker-compose.yml | |
git commit -m "chore: update content-node to ${COMMIT_HASH}" | |
git push |