Skip to content

Commit

Permalink
cchange interface
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Heinrich <andreas.heinrich@rwth-aachen.de>
  • Loading branch information
andistorm committed Sep 3, 2024
1 parent 7ba5bbe commit 0014a80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/tmp-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
uses: everest/everest-ci/github-actions/deploy-ci-logs@feature/add-reusable-ci-workflow
with:
target_repo: 'PionixInternal/tmp-test-github-pages'
source_repo: 'everest-ci'
workflow_run_id: ${{ github.run_id }}
logs_name: 'something'
logs_path: 'logs'
target_logs_name: 'something'
logs_dir: 'logs/'
github_token: ${{ secrets.SA_GITHUB_PAT }}
- name: Print deployed url
run: echo "Deployed to ${{ steps.deploy.outputs.deployed_url }}"
run: echo "Deployed to ${{ steps.deploy.outputs.deployed_url }}"
16 changes: 8 additions & 8 deletions github-actions/deploy-ci-logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ inputs:
target_repo:
description: 'Repository to deploy logs to'
required: true
default: 'everest.github.io'
source_repo:
description: 'Repository to deploy logs from'
required: true
default: 'everest-ci'
default: ${{ github.repository }}
workflow_run_id:
description: 'Workflow run id to deploy logs from'
required: true
logs_name:
default: ${{ github.run_id }}
target_logs_name:
description: 'Name of the logs to deploy'
required: true
logs_path:
description: 'Path to the logs to deploy'
logs_dir:
description: 'Directory containing the logs to deploy'
required: true
github_token:
description: 'Github token, with write access to the target repository'
Expand Down Expand Up @@ -47,17 +47,17 @@ runs:
id: determine_target_path
shell: bash
run: |
target_path="ci-logs/${{ inputs.source_repo }}/${{ inputs.workflow_run_id }}/${{ inputs.logs_name }}"
target_path="ci-logs/${{ inputs.source_repo }}/${{ inputs.workflow_run_id }}/${{ inputs.target_logs_name }}"
echo "target_path=$target_path" >> $GITHUB_OUTPUT
- name: Copy logs
shell: bash
run: |
mkdir -p gh-pages-repo/${{ steps.determine_target_path.outputs.target_path }}
cp -r ${{ inputs.logs_path }}/* gh-pages-repo/${{ steps.determine_target_path.outputs.target_path }}
cp -r ${{ inputs.logs_dir }}/* gh-pages-repo/${{ steps.determine_target_path.outputs.target_path }}
- name: Commit and push logs
shell: bash
run: |
git add ${{ steps.determine_target_path.outputs.target_path }}
git commit -m "Deploy logs: ${{ inputs.source_repo }}/${{ inputs.workflow_run_id }}/${{ inputs.logs_name }}"
git commit -m "Deploy logs: ${{ inputs.source_repo }}/${{ inputs.workflow_run_id }}/${{ inputs.target_logs_name }}"
git push
working-directory: gh-pages-repo

0 comments on commit 0014a80

Please sign in to comment.