Sync release 20241206 (#5322)
This commit is contained in:
commit
0135299c15
|
@ -38,7 +38,7 @@ runs:
|
|||
throw new Error(`Stability ${{ inputs.stability }} should not deliver packages`);
|
||||
}
|
||||
|
||||
if ('${{ inputs.stability }}' === 'testing' && ! ['testing', 'hotfix'].includes('${{ inputs.release_type }}')) {
|
||||
if ('${{ inputs.stability }}' === 'testing' && ! ['release', 'hotfix'].includes('${{ inputs.release_type }}')) {
|
||||
throw new Error('release_type input must be defined when stability is testing');
|
||||
}
|
||||
|
||||
|
@ -107,31 +107,29 @@ runs:
|
|||
}
|
||||
|
||||
- name: Download packages from testing
|
||||
if: ${{ inputs.stability == 'testing' }}
|
||||
if: ${{ inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy' }}
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
with:
|
||||
script: |
|
||||
const warningNoPromote = 'No packages are promoted because push is not related to a hotfix/release pull request.';
|
||||
const commitSha = context.sha;
|
||||
|
||||
const { data: { items } } = await github.rest.search.issuesAndPullRequests({
|
||||
q: `${commitSha} type:pr is:merged`
|
||||
const pulls = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
sort: 'updated',
|
||||
direction: 'desc',
|
||||
state: 'closed',
|
||||
per_page: 100
|
||||
});
|
||||
|
||||
if (items.length === 0) {
|
||||
const pr = pulls.data.find(p => p.merge_commit_sha === commitSha);
|
||||
if (!pr) {
|
||||
core.warning(warningNoPromote);
|
||||
return;
|
||||
}
|
||||
|
||||
const prNumber = items[0].number;
|
||||
|
||||
const pr = await github.rest.pulls.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: prNumber
|
||||
});
|
||||
|
||||
const prBaseRef = pr.data?.base?.ref || 'unknown';
|
||||
const prBaseRef = pr?.base?.ref || 'unknown';
|
||||
let releaseType = '';
|
||||
switch (true) {
|
||||
case /^release.+/.test(prBaseRef):
|
||||
|
@ -167,7 +165,7 @@ runs:
|
|||
- name: Publish packages to ${{ inputs.stability }}
|
||||
if: |
|
||||
contains(fromJson('["testing", "unstable"]'), inputs.stability) ||
|
||||
(needs.get-version.outputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy')
|
||||
(inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy')
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
with:
|
||||
script: |
|
||||
|
|
|
@ -358,6 +358,8 @@ jobs:
|
|||
runner_name: ["self-hosted", "collect-arm64"]
|
||||
- name: "Net::Amazon::Signature::V4"
|
||||
build_distribs: ["bullseye", "jammy"]
|
||||
- name: "Net::MQTT::Simple"
|
||||
version: "1.29"
|
||||
- name: "Paws"
|
||||
use_dh_make_perl: "false"
|
||||
deb_dependencies: "libmoose-perl libmoosex-classattribute-perl libjson-maybexs-perl liburl-encode-perl libargv-struct-perl libmoo-perl libtype-tiny-perl libdatastruct-flat-perl libmodule-find-perl libthrowable-perl liburi-template-perl libnet-amazon-signature-v4-perl"
|
||||
|
|
Loading…
Reference in New Issue