Repo Refresh #14
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: branch-deploy | |
on: | |
issue_comment: | |
types: [created] | |
permissions: write-all | |
jobs: | |
rubocop: | |
name: runner / rspec | |
runs-on: ubuntu-latest | |
steps: | |
- name: branch-deploy | |
id: branch-deploy | |
uses: github/branch-deploy@fb5baec9eccc077f582d8850521b8bc3043f550f # [email protected] | |
# Check out the ref from the output of the IssueOps command | |
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # [email protected] | |
with: | |
ref: ${{ steps.branch-deploy.outputs.ref }} | |
- uses: ruby/setup-ruby@cd4241788aec4fdcd3325da7068efa9b62a017af | |
with: | |
ruby-version: 3.2.0 | |
bundler-cache: true | |
- name: bootstrap | |
run: script/bootstrap | |
# Here we run a deploy. It is "gated" by the IssueOps logic and will only run if the outputs from our branch-deploy step indicate that the workflow should continue | |
- name: deploy | |
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | |
run: | | |
set -o pipefail | |
script/deploy | tee deploy.out | |
MSG=$(cat deploy.out) | |
MSG="\`\`\`output\n${MSG}\n\`\`\`" | |
echo 'DEPLOY_MESSAGE<<EOF' >> $GITHUB_ENV | |
echo "$MSG" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV |