diff --git a/.github/workflows/create-pull-request-multi.yml b/.github/workflows/create-pull-request-multi.yml index 14b0779..a2788ec 100644 --- a/.github/workflows/create-pull-request-multi.yml +++ b/.github/workflows/create-pull-request-multi.yml @@ -10,25 +10,31 @@ jobs: platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v1 - - name: Create report file - if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest' - run: touch report.txt - - name: Create report file (windows) - if: matrix.platform == 'windows-latest' - run: type NUL > report.txt - - name: Create Pull Request - uses: peter-evans/create-pull-request@multi-platform-release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMMIT_MESSAGE: Add report file - PULL_REQUEST_BODY: > - This PR is auto-generated by - [create-pull-request](https://github.com/peter-evans/create-pull-request). - PULL_REQUEST_TITLE: '[Example] Add report file' - PULL_REQUEST_LABELS: report, automated pr - PULL_REQUEST_ASSIGNEES: peter-evans - PULL_REQUEST_REVIEWERS: peter-evans - PULL_REQUEST_MILESTONE: 1 - PULL_REQUEST_BRANCH: example-patches - BRANCH_SUFFIX: 'timestamp' + - uses: actions/checkout@v1 + - name: Create report file + if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest' + run: date +%s > report.txt + - name: Create report file (windows) + if: matrix.platform == 'windows-latest' + run: echo %DATE% %TIME% > report.txt + - name: Create Pull Request + uses: peter-evans/create-pull-request@multi-platform-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MESSAGE: Add report file + PULL_REQUEST_BODY: > + This PR is auto-generated by + [create-pull-request](https://github.com/peter-evans/create-pull-request). + PULL_REQUEST_TITLE: '[Example] Add report file' + PULL_REQUEST_LABELS: report, automated pr + PULL_REQUEST_ASSIGNEES: peter-evans + PULL_REQUEST_REVIEWERS: peter-evans + PULL_REQUEST_MILESTONE: 1 + PULL_REQUEST_BRANCH: example-patches + BRANCH_SUFFIX: 'random' + - name: Check output environment variable + if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest' + run: echo "Pull Request Number - $PULL_REQUEST_NUMBER" + - name: Check output environment variable (windows) + if: matrix.platform == 'windows-latest' + run: echo Pull Request Number - %PULL_REQUEST_NUMBER% diff --git a/.github/workflows/create-pull-request.yml b/.github/workflows/create-pull-request.yml index 3864b25..aade0c7 100644 --- a/.github/workflows/create-pull-request.yml +++ b/.github/workflows/create-pull-request.yml @@ -6,21 +6,23 @@ jobs: createPullRequest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Create report file - run: touch report.txt - - name: Create Pull Request - uses: ./ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMMIT_MESSAGE: Add report file - PULL_REQUEST_BODY: > - This PR is auto-generated by - [create-pull-request](https://github.com/peter-evans/create-pull-request). - PULL_REQUEST_TITLE: '[Example] Add report file' - PULL_REQUEST_LABELS: report, automated pr - PULL_REQUEST_ASSIGNEES: peter-evans - PULL_REQUEST_REVIEWERS: peter-evans - PULL_REQUEST_MILESTONE: 1 - PULL_REQUEST_BRANCH: example-patches - BRANCH_SUFFIX: short-commit-hash + - uses: actions/checkout@v1 + - name: Create report file + run: date +%s > report.txt + - name: Create Pull Request + uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MESSAGE: Add report file + PULL_REQUEST_BODY: > + This PR is auto-generated by + [create-pull-request](https://github.com/peter-evans/create-pull-request). + PULL_REQUEST_TITLE: '[Example] Add report file' + PULL_REQUEST_LABELS: report, automated pr + PULL_REQUEST_ASSIGNEES: peter-evans + PULL_REQUEST_REVIEWERS: peter-evans + PULL_REQUEST_MILESTONE: 1 + PULL_REQUEST_BRANCH: example-patches + BRANCH_SUFFIX: short-commit-hash + - name: Check output environment variable + run: echo "Pull Request Number - $PULL_REQUEST_NUMBER"