Skip to content

Commit

Permalink
Make CI run checkout PR for backlogger_preview
Browse files Browse the repository at this point in the history
Signed-off-by: ybonatakis <[email protected]>
  • Loading branch information
b10n1k committed Apr 22, 2024
1 parent 38d6dfc commit f7dc564
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Run the action implemented in this repo
uses: ./
with:
config: queries.yaml
ref: ${{ github.event.pull_request.head.sha }}
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: gh-pages
12 changes: 4 additions & 8 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@v4
with:
repository: openSUSE/backlogger
path: backlogger
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r backlogger/requirements.txt
pip install -r requirements.txt
shell: bash
- run: sudo apt-get update && sudo apt-get install -y kramdown weasyprint imagemagick ghostscript
shell: bash
Expand All @@ -53,7 +49,7 @@ runs:
shell: bash
- name: Render Markdown from configured backlog queries
run: |
python backlogger/backlogger.py ${{ inputs.config }} ${{ inputs.args }}
python backlogger.py ${{ inputs.config }} ${{ inputs.args }}
echo "BACKLOG_STATUS=$?" >> "$GITHUB_ENV"
env:
REDMINE_API_KEY: ${{ inputs.REDMINE_API_KEY }}
Expand Down Expand Up @@ -81,9 +77,9 @@ runs:
run: |
mkdir -p ${{ inputs.folder }}
cd ${{ inputs.folder }}
cat ../backlogger/head.html > index.html
cat ../head.html > index.html
kramdown ../index.md >> index.html
cat ../backlogger/foot.html >> index.html
cat ../foot.html >> index.html
sed -i \
-e "s@STATUS_COLOR@${{ env.STATUS_COLOR }}@g" \
-e "s@GITHUB_REPOSITORY@${{ github.repository }}@g" \
Expand Down

0 comments on commit f7dc564

Please sign in to comment.