mirror of
https://github.com/systemd/systemd.git
synced 2025-01-23 02:04:32 +03:00
135c249147
Bumps [redhat-plumbers-in-action/devel-freezer](https://github.com/redhat-plumbers-in-action/devel-freezer) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/redhat-plumbers-in-action/devel-freezer/releases)
- [Commits](13b6551f19...67aec4a153
)
---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/devel-freezer
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
# doc: https://github.com/redhat-plumbers-in-action/devel-freezer#readme
|
|
---
|
|
|
|
name: Development Freeze
|
|
on:
|
|
workflow_run:
|
|
workflows: [ Gather Pull Request Metadata ]
|
|
types:
|
|
- completed
|
|
|
|
env:
|
|
PULL_REQUEST_METADATA_DIR: pull_request
|
|
PULL_REQUEST_METADATA_FILE: metadata
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
freezer:
|
|
if: >
|
|
github.event.workflow_run.event == 'pull_request' &&
|
|
github.event.workflow_run.conclusion == 'success' &&
|
|
github.repository == 'systemd/systemd'
|
|
runs-on: ubuntu-22.04
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Download Pull Request Metadata artifact
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
|
with:
|
|
script: |
|
|
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
run_id: ${{ github.event.workflow_run.id }},
|
|
});
|
|
|
|
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
|
return artifact.name == "${{ env.PULL_REQUEST_METADATA_FILE }}"
|
|
})[0];
|
|
|
|
const download = await github.rest.actions.downloadArtifact({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
artifact_id: matchArtifact.id,
|
|
archive_format: 'zip',
|
|
});
|
|
|
|
const fs = require('fs');
|
|
fs.writeFileSync('${{ github.workspace }}/${{ env.PULL_REQUEST_METADATA_FILE }}.zip', Buffer.from(download.data));
|
|
|
|
- run: unzip ${{ env.PULL_REQUEST_METADATA_FILE }}.zip
|
|
|
|
- name: 'Get Pull Request number'
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const fs = require('fs');
|
|
const pr_number = Number(fs.readFileSync('./${{ env.PULL_REQUEST_METADATA_FILE }}'));
|
|
core.exportVariable('pr_number', pr_number);
|
|
|
|
- name: Repository checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Development Freezer
|
|
uses: redhat-plumbers-in-action/devel-freezer@67aec4a153bd9fca5322e1c4dd4d7c419fb36362
|
|
with:
|
|
pr-number: ${{ env.pr_number }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|