From 51fda8bdfea5995c172b9483107ebe13130be658 Mon Sep 17 00:00:00 2001 From: Andrei Kozhevnikov Date: Sat, 31 Aug 2024 12:18:23 +0700 Subject: [PATCH] test ci --- .github/workflows/02_get_artifact.yml | 31 ------------------- .../{01_make_patch.yml => make_patch.yml} | 11 ++++--- usr/lib/qt5/qml/Sailfish/Silica/Button.qml | 2 +- 3 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/02_get_artifact.yml rename .github/workflows/{01_make_patch.yml => make_patch.yml} (69%) diff --git a/.github/workflows/02_get_artifact.yml b/.github/workflows/02_get_artifact.yml deleted file mode 100644 index 193aa4af..00000000 --- a/.github/workflows/02_get_artifact.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Get Artifact - -on: pull_request - -jobs: - get_artifact: - runs-on: ubuntu-latest - - steps: - - name: Grab last artifact - id: last_artifact - run: | - sleep 20 - runs=$(curl -s https://api.github.com/repos/sailfishos-patches/sailfish-qml/actions/workflows/3182534/runs) - check_suite_id=$(echo $runs | jq ".workflow_runs[0].check_suite_id") - run_id=$(echo $runs | jq ".workflow_runs[0].id") - artifact_id=$(curl -s https://api.github.com/repos/sailfishos-patches/sailfish-qml/actions/runs/${run_id}/artifacts | jq ".artifacts[0].id") - archive_download_url="https://github.com/sailfishos-patches/sailfish-qml/suites/${check_suite_id}/artifacts/${artifact_id}" - echo "::set-output name=archive_download_url::${archive_download_url}" - - - name: 'Comment PR' - uses: actions/github-script@v3 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Hello @${{ github.event.pull_request.user.login }}\nYour patch is ready!\n\n[Download link](${{ steps.last_artifact.outputs.archive_download_url }})' - }) diff --git a/.github/workflows/01_make_patch.yml b/.github/workflows/make_patch.yml similarity index 69% rename from .github/workflows/01_make_patch.yml rename to .github/workflows/make_patch.yml index 8be59ca6..87827a1d 100644 --- a/.github/workflows/01_make_patch.yml +++ b/.github/workflows/make_patch.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Create diff run: | @@ -17,19 +17,20 @@ jobs: cp patch/*.qml patch/*.png patch/*.js patch/*.svg patch/*.qm .github/patch_data |: - name: Upload build result - uses: actions/upload-artifact@v2 + id: artifact-upload-step + uses: actions/upload-artifact@v4 with: name: ${{ github.head_ref }} path: .github/patch_data - name: 'Comment PR' - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'Hello @${{ github.event.pull_request.user.login }}\nYour patch is ready as Artifact inside of [Checks](https://github.com/sailfishos-patches/sailfish-qml/pull/${{ github.event.pull_request.number }}/checks)\n\nTrying to get direct download link in couple of seconds...' + body: 'Hello @${{ github.event.pull_request.user.login }}\nYour patch is ready!\n\n[Download link](${{ steps.artifact-upload-step.outputs.artifact-url }})' }) diff --git a/usr/lib/qt5/qml/Sailfish/Silica/Button.qml b/usr/lib/qt5/qml/Sailfish/Silica/Button.qml index 4b2da361..069c4871 100644 --- a/usr/lib/qt5/qml/Sailfish/Silica/Button.qml +++ b/usr/lib/qt5/qml/Sailfish/Silica/Button.qml @@ -109,7 +109,7 @@ SilicaMouseArea { id: image anchors.verticalCenter: parent.verticalCenter - objectName: "image" + objectName: "testimage" } Label {