Sync Files #8
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
# Candace Savonen Aug 2021 | |
name: Sync Files | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
inputs: | |
prtag: | |
description: 'Tag to use?' | |
required: true | |
default: 'null' | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Login as github actions bot | |
run: | | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Get the version | |
id: get_tag | |
run: | | |
if [ github.event.inputs.prtag == 'null' ] | |
then | |
echo "version=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
fi | |
if [ github.event.inputs.prtag != 'null' ] | |
then | |
echo "version=${{ github.event.inputs.prtag }}" >> $GITHUB_OUTPUT | |
fi | |
- name: Run Mechanics File Sync | |
uses: BetaHuhn/[email protected] | |
with: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
COMMIT_BODY: release-${{ steps.get_tag.outputs.version }} |