Skip to content

Commit

Permalink
Use simple bash variable expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 5, 2022
1 parent 98919f7 commit acedd1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: 🚀 changelog
run: |
git config --local user.name ${BOT_NAME}
git config --local user.email ${BOT_EMAIL}
git config --local user.name $BOT_NAME
git config --local user.email $BOT_EMAIL
git add changelog.md
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
24 changes: 12 additions & 12 deletions .github/workflows/defaults/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ runs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }}
run: |
if [ -z "${GH_TOKEN_SECRET}" ]
if [ -z "$GH_TOKEN_SECRET" ]
then
echo "Using default GITHUB_TOKEN"
echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
echo "GH_TOKEN=$GITHUB_TOKEN" >> $GITHUB_ENV
else
echo "Using custom GH_TOKEN"
echo "GH_TOKEN=${GH_TOKEN_SECRET}" >> $GITHUB_ENV
echo "GH_TOKEN=$GH_TOKEN_SECRET" >> $GITHUB_ENV
fi
- name: 🔍 BOT_NAME
Expand All @@ -25,13 +25,13 @@ runs:
env:
BOT_NAME_SECRET: ${{ secrets.BOT_NAME }}
run: |
if [ -z "${BOT_NAME_SECRET}" ]
if [ -z "$BOT_NAME_SECRET" ]
then
echo "Using default GITHUB_AUTHOR as BOT_NAME"
echo "BOT_NAME=${GITHUB_AUTHOR}" >> $GITHUB_ENV
echo "BOT_NAME=$GITHUB_AUTHOR" >> $GITHUB_ENV
else
echo "Using custom BOT_NAME"
echo "BOT_NAME=${BOT_NAME_SECRET}" >> $GITHUB_ENV
echo "BOT_NAME=$BOT_NAME_SECRET" >> $GITHUB_ENV
fi
- name: 🔍 BOT_EMAIL
Expand All @@ -40,13 +40,13 @@ runs:
env:
BOT_EMAIL_SECRET: ${{ secrets.BOT_EMAIL }}
run: |
if [ -z "${BOT_EMAIL_SECRET}" ]
if [ -z "$BOT_EMAIL_SECRET" ]
then
echo "Using default GITHUB_AUTHOR as BOT_EMAIL"
echo "BOT_EMAIL=${GITHUB_AUTHOR}@users.noreply.github.com" >> $GITHUB_ENV
echo "BOT_EMAIL=$GITHUB_AUTHOR@users.noreply.github.com" >> $GITHUB_ENV
else
echo "Using custom BOT_EMAIL"
echo "BOT_EMAIL=${BOT_EMAIL_SECRET}" >> $GITHUB_ENV
echo "BOT_EMAIL=$BOT_EMAIL_SECRET" >> $GITHUB_ENV
fi
- name: 🔍 BOT_AUTHOR
Expand All @@ -55,11 +55,11 @@ runs:
env:
BOT_AUTHOR_SECRET: ${{ secrets.BOT_AUTHOR }}
run: |
if [ -z "${BOT_AUTHOR_SECRET}" ]
if [ -z "$BOT_AUTHOR_SECRET" ]
then
echo "Using default BOT_NAME <$BOT_EMAIL> as BOT_AUTHOR"
echo "BOT_AUTHOR=${BOT_NAME} <${BOT_EMAIL}>" >> $GITHUB_ENV
echo "BOT_AUTHOR=$BOT_NAME <$BOT_EMAIL>" >> $GITHUB_ENV
else
echo "Using custom BOT_AUTHOR"
echo "BOT_AUTHOR=${BOT_AUTHOR_SECRET}" >> $GITHUB_ENV
echo "BOT_AUTHOR=$BOT_AUTHOR_SECRET" >> $GITHUB_ENV
fi

0 comments on commit acedd1d

Please sign in to comment.