diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5811f54..1dfcda70 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-03T11:00:40Z by kres latest. +# Generated on 2023-11-07T19:17:25Z by kres latest. name: default concurrency: @@ -22,6 +22,7 @@ jobs: permissions: actions: read contents: write + issues: read packages: write pull-requests: read runs-on: @@ -29,10 +30,10 @@ jobs: - pkgs if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) outputs: - labels: ${{ steps.workflow-run-info.outputs.pullRequestLabels }} + labels: ${{ steps.retrieve-pr-labels.outputs.result }} services: buildkitd: - image: moby/buildkit:v0.12.2 + image: moby/buildkit:v0.12.3 options: --privileged ports: - 1234:1234 @@ -53,6 +54,17 @@ jobs: platforms: linux/arm64 driver: remote endpoint: tcp://localhost:1234 + - name: Save PR number + if: github.event_name == 'pull_request' && always() + run: | + echo ${{ github.event.number }} > pr-number.txt + - name: Upload PR number + if: github.event_name == 'pull_request' && always() + uses: actions/upload-artifact@v3 + with: + name: pr-number + path: pr-number.txt + retention-days: "1" - name: Build run: | make @@ -74,11 +86,20 @@ jobs: if: github.event_name != 'pull_request' run: | make nonfree PUSH=true - - name: Retrieve workflow info - id: workflow-run-info - uses: potiuk/get-workflow-origin@v1_5 + - name: Retrieve PR labels + id: retrieve-pr-labels + if: github.event_name == 'pull_request' && always() + uses: actions/github-script@v6 with: - token: ${{ secrets.GITHUB_TOKEN }} + retries: "3" + script: | + const resp = await github.rest.issues.get({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }) + + return resp.data.labels - name: release-notes if: startsWith(github.ref, 'refs/tags/') run: | @@ -98,7 +119,7 @@ jobs: - default services: buildkitd: - image: moby/buildkit:v0.12.2 + image: moby/buildkit:v0.12.3 options: --privileged ports: - 1234:1234 diff --git a/.github/workflows/slack-notify.yaml b/.github/workflows/slack-notify.yaml index 46abd21f..212b7516 100644 --- a/.github/workflows/slack-notify.yaml +++ b/.github/workflows/slack-notify.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-03T11:00:40Z by kres latest. +# Generated on 2023-11-07T19:17:25Z by kres latest. name: slack-notify "on": @@ -15,14 +15,35 @@ jobs: runs-on: - self-hosted - generic - if: ${{ github.event.workflow_run.conclusion != 'skipped' }} + if: github.event.workflow_run.conclusion != 'skipped' steps: - - name: Retrieve Workflow Run Info - id: retrieve-workflow-run-info - uses: potiuk/get-workflow-origin@v1_5 + - name: Download PR artifact + if: github.event.workflow_run.event == 'pull_request' + uses: actions/github-script@v6 with: - sourceRunId: ${{ github.event.workflow_run.id }} - token: ${{ secrets.GITHUB_TOKEN }} + script: |- + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == "pr-number" + })[0]; + let download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + let fs = require('fs'); + fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr-number.zip`, Buffer.from(download.data)); + - name: Get PR number + id: get-pr-number + if: github.event.workflow_run.event == 'pull_request' + run: | + unzip pr-number.zip + echo pull_request_number=$(cat pr-number.txt) >> $GITHUB_OUTPUT - name: Slack Notify uses: slackapi/slack-github-action@v1 with: @@ -39,7 +60,7 @@ jobs: "fields": [ { "type": "mrkdwn", - "text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.retrieve-workflow-run-info.outputs.pullRequestNumber, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }}" + "text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.get-pr-number.outputs.pull_request_number, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }}" }, { "type": "mrkdwn", diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index 15ce0a59..3754e5b1 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-03T11:00:40Z by kres latest. +# Generated on 2023-11-07T19:17:25Z by kres latest. name: weekly concurrency: @@ -16,7 +16,7 @@ jobs: - pkgs services: buildkitd: - image: moby/buildkit:v0.12.2 + image: moby/buildkit:v0.12.3 options: --privileged ports: - 1234:1234 diff --git a/.kres.yaml b/.kres.yaml index 040b35f3..a4cb5933 100644 --- a/.kres.yaml +++ b/.kres.yaml @@ -66,7 +66,7 @@ spec: - name: EXTENSIONS_IMAGE_REF defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG) - name: PKGS - defaultValue: v1.6.0-alpha.0-26-g5f84302 + defaultValue: v1.6.0-alpha.0-28-g0bb2a79 depends: - internal/extensions/image-digests script: diff --git a/Makefile b/Makefile index 2e07297f..bfa065b3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-03T11:00:40Z by kres latest. +# Generated on 2023-11-07T19:17:52Z by kres latest. # common variables @@ -82,7 +82,7 @@ NONFREE_TARGETS = nonfree-kmod-nvidia # extra variables EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG) -PKGS ?= v1.6.0-alpha.0-26-g5f84302 +PKGS ?= v1.6.0-alpha.0-28-g0bb2a79 # help menu @@ -201,3 +201,4 @@ release-notes: conformance: @docker pull $(CONFORMANCE_IMAGE) @docker run --rm -it -v $(PWD):/src -w /src $(CONFORMANCE_IMAGE) enforce +