diff --git a/.github/workflows/tmp-test-action.yml b/.github/workflows/tmp-test-action.yml index 77182ff..9bb576f 100644 --- a/.github/workflows/tmp-test-action.yml +++ b/.github/workflows/tmp-test-action.yml @@ -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 }}" \ No newline at end of file + run: echo "Deployed to ${{ steps.deploy.outputs.deployed_url }}" diff --git a/github-actions/deploy-ci-logs/action.yaml b/github-actions/deploy-ci-logs/action.yaml index d9eecd5..ab16a1f 100644 --- a/github-actions/deploy-ci-logs/action.yaml +++ b/github-actions/deploy-ci-logs/action.yaml @@ -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' @@ -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