From 0fe329b885d07a5fdf00376a5fd2971248585b59 Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Tue, 16 Jan 2024 17:01:51 -0600 Subject: [PATCH] Fix external repo-banner creation --- .github/workflows/repo-banner.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/repo-banner.yml b/.github/workflows/repo-banner.yml index b0f3dac7..4f79c38f 100644 --- a/.github/workflows/repo-banner.yml +++ b/.github/workflows/repo-banner.yml @@ -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: | @@ -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 }}"