mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
Add apt/apt-get updates before we do apt/apt-get installs to try and help with issues where we fail to fetch packages Co-authored-by: Fabiano Fidêncio <fidencio@northflank.com> Signed-off-by: stevenhorsman <steven@uk.ibm.com>
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
# Copyright (c) 2022 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
name: Add PR sizing label
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
add-pr-size-label:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
fetch-depth: 0
|
|
|
|
- name: Rebase atop of the latest target branch
|
|
run: |
|
|
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
|
|
env:
|
|
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
|
|
|
|
- name: Install PR sizing label 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 pr-add-size-label.sh /usr/local/bin
|
|
popd &>/dev/null
|
|
|
|
- name: Add PR sizing label
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.KATA_GITHUB_ACTIONS_PR_SIZE_TOKEN }}
|
|
run: |
|
|
pr=${{ github.event.number }}
|
|
# Removing man-db, workflow kept failing, fixes: #4480
|
|
sudo apt -y remove --purge man-db
|
|
sudo apt update && sudo apt -y install diffstat patchutils
|
|
|
|
pr-add-size-label.sh -p "$pr"
|