Skip to content

chore(deps): update cloudposse/github-action-yaml-config-query action to v1 #611

chore(deps): update cloudposse/github-action-yaml-config-query action to v1

chore(deps): update cloudposse/github-action-yaml-config-query action to v1 #611

Workflow file for this run

name: GitHub Org Banner
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
generate:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- name: Generate banner image
id: screenshot
uses: cloudposse-github-actions/screenshot@main
with:
url: "file://${{github.workspace}}/profile/banner/index.html"
output: "profile/banner/image.png"
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview
viewportWidth: 1280
viewportHeight: 370
omitBackground: true
- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit artifact
id: auto-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "chore: update org banner image"
commit_user_name: screenshot-action 📷
commit_user_email: [email protected]
commit_author: screenshot-action 📷 <[email protected]>
file_pattern: 'profile/*.png'
- name: Add Image to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true'
run: |
echo "## Generated Screenshot" >> $GITHUB_STEP_SUMMARY
echo "![Generated Screenshot](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screenshot.outputs.file }}?raw=true)" >> $GITHUB_STEP_SUMMARY
- name: No changes
if: steps.auto-commit.outputs.changes_detected == 'false'
run: |
echo "No changes to screenshot" >> $GITHUB_STEP_SUMMARY