Skip to content

Commit

Permalink
Fix external repo-banner creation
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman committed Jan 16, 2024
1 parent 1505016 commit 0fe329b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/repo-banner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3

- name: Fetch repo metadata
id: metadata
uses: ahmadnassri/action-metadata@v2

- name: Checkout ${{ steps.metadata.outputs.repository_name}}/.github
if: '${{ steps.metadata.outputs.repository_name}} !== ".github"'
uses: actions/checkout@v3
with:
repository: '${{ steps.metadata.outputs.owner_login }}/.github'
ref: 'main'
path: 'github'

- name: Checkout outselves (if we're .github)
if: '${{ steps.metadata.outputs.repository_name}} == ".github"'
uses: actions/checkout@v3
with:
path: 'github'

- name: Format Repo Metadata
id: meta
run: |
Expand Down Expand Up @@ -63,7 +75,7 @@ jobs:
id: screenshot
uses: cloudposse-github-actions/screenshot@main
with:
url: "file://${{github.workspace}}/banner/index.html"
url: "file://${{github.workspace}}/github/banner/index.html"
output: "banner/image.png"
customizations: |
"#name": "${{ steps.meta.outputs.name }}"
Expand Down

0 comments on commit 0fe329b

Please sign in to comment.