From 351dcd1c6490dcc091b523cfd804391f737d86ba Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Mon, 29 Jun 2020 13:11:53 +0200 Subject: [PATCH] Create an issue @ Docker repository on tag --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a67b4e6e5..7255735d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,3 +56,20 @@ jobs: asset_path: ./composer.phar asset_name: composer.phar asset_content_type: application/octet-stream + + # This step requires a secret token with `pull` access to composer/docker. The default + # secrets.GITHUB_TOKEN is scoped to this repository only which is not sufficient. + - name: "Open issue @ Docker repository" + uses: actions/github-script@v2 + with: + github-token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} + script: | + // github.ref value looks like 'refs/tags/TAG', cleanup + const tag = "${{ github.ref }}".replace(/refs\/tags\//, ''); + // create new issue on Docker repository + github.issues.create({ + owner: "${{ github.repository_owner }}", + repo: "docker", + title: `New Composer tag: ${ tag }`, + body: `https://github.com/${{ github.repository }}/releases/tag/${ tag }`, + });