mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
> Quote this to prevent word splitting. Quote around subshell Signed-off-by: stevenhorsman <steven@uk.ibm.com>
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
# Copyright (c) 2020 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
name: Add newly created issues to the backlog project
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
add-new-issues-to-backlog:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Install hub
|
|
run: |
|
|
HUB_ARCH="amd64"
|
|
HUB_VER=$(curl -sL "https://api.github.com/repos/github/hub/releases/latest" |\
|
|
jq -r .tag_name | sed 's/^v//')
|
|
curl -sL \
|
|
"https://github.com/github/hub/releases/download/v${HUB_VER}/hub-linux-${HUB_ARCH}-${HUB_VER}.tgz" |\
|
|
tar xz --strip-components=2 --wildcards '*/bin/hub' && \
|
|
sudo install hub /usr/local/bin
|
|
|
|
- name: Install hub extension script
|
|
run: |
|
|
# Clone into a temporary directory to avoid overwriting
|
|
# any existing github directory.
|
|
pushd "$(mktemp -d)" &>/dev/null
|
|
git clone --single-branch --depth 1 "https://github.com/kata-containers/.github" && cd .github/scripts
|
|
sudo install hub-util.sh /usr/local/bin
|
|
popd &>/dev/null
|
|
|
|
- name: Checkout code to allow hub to communicate with the project
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Add issue to issue backlog
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.KATA_GITHUB_ACTIONS_TOKEN }}
|
|
run: |
|
|
issue=${{ github.event.issue.number }}
|
|
|
|
project_name="Issue backlog"
|
|
project_type="org"
|
|
project_column="To do"
|
|
|
|
hub-util.sh \
|
|
add-issue \
|
|
"$issue" \
|
|
"$project_name" \
|
|
"$project_type" \
|
|
"$project_column"
|