Merge pull request #2238 from flatcar/krnowak/actions-update

github: Modernize the actions a bit
This commit is contained in:
Krzesimir Nowak 2022-11-02 15:59:45 +01:00 committed by GitHub
commit 4dfba02e59
16 changed files with 53 additions and 53 deletions

View File

@ -48,5 +48,5 @@ generate_patches app-emulation containerd Containerd
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-containerd-release: get-containerd-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Containerd release - name: Fetch latest Containerd release
@ -18,9 +18,9 @@ jobs:
versionMain=$(git -C containerd ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1) versionMain=$(git -C containerd ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/v[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/v//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -n1)
commitMain=$(git -C containerd rev-parse v${versionMain}) commitMain=$(git -C containerd rev-parse v${versionMain})
rm -rf containerd rm -rf containerd
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=COMMIT_MAIN::$(echo ${commitMain}) echo "COMMIT_MAIN=${commitMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -36,7 +36,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/containerd-apply-patch.sh run: .github/workflows/containerd-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -60,5 +60,5 @@ generate_patches app-emulation docker Docker app-emulation/docker-cli app-torcx/
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-docker-release: get-docker-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Docker release - name: Fetch latest Docker release
@ -20,10 +20,10 @@ jobs:
commitMain=$(git -C docker rev-parse --short=10 v${versionMain}) commitMain=$(git -C docker rev-parse --short=10 v${versionMain})
commitCli=$(git -C docker-cli rev-parse --short=10 v${versionMain}) commitCli=$(git -C docker-cli rev-parse --short=10 v${versionMain})
rm -rf docker docker-cli rm -rf docker docker-cli
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=COMMIT_MAIN::$(echo ${commitMain}) echo "COMMIT_MAIN=${commitMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=COMMIT_CLI::$(echo ${commitCli}) echo "COMMIT_CLI=${commitCli}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -40,7 +40,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/docker-apply-patch.sh run: .github/workflows/docker-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -36,5 +36,5 @@ generate_patches sys-kernel coreos-firmware "Linux Firmware"
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-firmware-release: get-firmware-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Linux Firmware release - name: Fetch latest Linux Firmware release
@ -17,8 +17,8 @@ jobs:
git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git git clone --depth=1 --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
versionMain=$(git -C linux-firmware ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1) versionMain=$(git -C linux-firmware ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1)
rm -rf linux-firmware rm -rf linux-firmware
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -33,7 +33,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/firmware-apply-patch.sh run: .github/workflows/firmware-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -76,7 +76,7 @@ apply_patches
vo_gh="$(join_by ' and ' "${UPDATED_VERSIONS_OLD[@]}")" vo_gh="$(join_by ' and ' "${UPDATED_VERSIONS_OLD[@]}")"
vn_gh="$(join_by ' and ' "${UPDATED_VERSIONS_NEW[@]}")" vn_gh="$(join_by ' and ' "${UPDATED_VERSIONS_NEW[@]}")"
echo ::set-output name=VERSIONS_OLD::"${vo_gh}" echo "VERSIONS_OLD=${vo_gh}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=VERSIONS_NEW::"${vn_gh}" echo "VERSIONS_NEW=${vn_gh}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BRANCH_NAME::"${branch_name}" echo "BRANCH_NAME=${branch_name}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"1" echo "UPDATE_NEEDED=1" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-go-releases: get-go-releases:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Go releases - name: Fetch latest Go releases
@ -22,8 +22,8 @@ jobs:
versionsMain+=($(git -C go ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/go${goversion}\(\.[0-9]*\)\?$/s/^refs\/tags\/go//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -1)) versionsMain+=($(git -C go ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/go${goversion}\(\.[0-9]*\)\?$/s/^refs\/tags\/go//p" | egrep -v -e '(beta|rc)' | sort -ruV | head -1))
done done
rm -rf go rm -rf go
echo ::set-output name=VERSIONS_MAIN::$(echo ${versionsMain[*]}) echo "VERSIONS_MAIN=${versionsMain[*]}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -38,7 +38,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/go-apply-patch.sh run: .github/workflows/go-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -9,7 +9,7 @@ jobs:
mirror-calico: mirror-calico:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Login to GitHub Container Registry (ghcr) - name: Login to GitHub Container Registry (ghcr)
run: echo ${{ secrets.GHCR_PASSWORD }} | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin run: echo ${{ secrets.GHCR_PASSWORD }} | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
- name: Fetch latest Calico release - name: Fetch latest Calico release

View File

@ -57,5 +57,5 @@ generate_patches app-emulation docker-runc Runc
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-runc-release: get-runc-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Runc release - name: Fetch latest Runc release
@ -22,9 +22,9 @@ jobs:
commitMain="$(git -C runc rev-parse v${versionMain})" commitMain="$(git -C runc rev-parse v${versionMain})"
versionMain="${versionMain//-/_}" versionMain="${versionMain//-/_}"
rm -rf runc rm -rf runc
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=COMMIT_MAIN::$(echo ${commitMain}) echo "COMMIT_MAIN=${commitMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -40,7 +40,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/runc-apply-patch.sh run: .github/workflows/runc-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -42,5 +42,5 @@ generate_patches dev-lang rust dev-lang/rust profiles
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-rust-release: get-rust-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Rust release - name: Fetch latest Rust release
@ -17,8 +17,8 @@ jobs:
git clone --depth=1 --no-checkout https://github.com/rust-lang/rust git clone --depth=1 --no-checkout https://github.com/rust-lang/rust
versionMain=$(git -C rust ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/1\.[0-9]*\.[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1) versionMain=$(git -C rust ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/1\.[0-9]*\.[0-9]*$/s/^refs\/tags\///p" | sort -ruV | head -n1)
rm -rf rust rm -rf rust
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -34,7 +34,7 @@ jobs:
run: .github/workflows/rust-apply-patch.sh run: .github/workflows/rust-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
id: create-pull-request id: create-pull-request
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -47,6 +47,6 @@ export PACKAGES_CONTAINER="flatcar-packages-${arch}-${docker_vernum}"
popd || exit popd || exit
echo ::set-output name=path::"${PATH}" echo "path=${PATH}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=PACKAGES_CONTAINER::"${PACKAGES_CONTAINER}" echo "PACKAGES_CONTAINER=${PACKAGES_CONTAINER}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=SDK_NAME::"${SDK_NAME}" echo "SDK_NAME=${SDK_NAME}" >>"${GITHUB_OUTPUT}"

View File

@ -45,5 +45,5 @@ generate_patches app-emulation open-vm-tools open-vm-tools coreos-base/oem-vmwar
apply_patches apply_patches
echo ::set-output name=VERSION_OLD::"${VERSION_OLD}" echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=UPDATE_NEEDED::"${UPDATE_NEEDED}" echo "UPDATE_NEEDED=${UPDATE_NEEDED}" >>"${GITHUB_OUTPUT}"

View File

@ -8,7 +8,7 @@ jobs:
get-vmware-release: get-vmware-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest open-vm-tools release - name: Fetch latest open-vm-tools release
@ -18,9 +18,9 @@ jobs:
versionMain=$(git -C open-vm-tools ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/stable-[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/stable-//p" | sort -ruV | head -n1) versionMain=$(git -C open-vm-tools ls-remote --tags origin | cut -f2 | sed -n "/refs\/tags\/stable-[0-9]*\.[0-9]*\.[0-9]*$/s/^refs\/tags\/stable-//p" | sort -ruV | head -n1)
buildNumber=$(curl -sSL https://api.github.com/repos/vmware/open-vm-tools/releases/latest | jq -r '.assets[0].name' | sed -n "s/^open-vm-tools-${versionMain}*-\([0-9]*\)\..*/\1/p") buildNumber=$(curl -sSL https://api.github.com/repos/vmware/open-vm-tools/releases/latest | jq -r '.assets[0].name' | sed -n "s/^open-vm-tools-${versionMain}*-\([0-9]*\)\..*/\1/p")
rm -rf open-vm-tools rm -rf open-vm-tools
echo ::set-output name=BASE_BRANCH_MAIN::main echo "BASE_BRANCH_MAIN=main" >>"${GITHUB_OUTPUT}"
echo ::set-output name=BUILD_NUMBER::$(echo ${buildNumber}) echo "BUILD_NUMBER=${buildNumber}" >>"${GITHUB_OUTPUT}"
echo ::set-output name=VERSION_MAIN::$(echo ${versionMain}) echo "VERSION_MAIN=${versionMain}" >>"${GITHUB_OUTPUT}"
- name: Set up Flatcar SDK - name: Set up Flatcar SDK
id: setup-flatcar-sdk id: setup-flatcar-sdk
run: .github/workflows/setup-flatcar-sdk.sh run: .github/workflows/setup-flatcar-sdk.sh
@ -36,7 +36,7 @@ jobs:
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
run: .github/workflows/vmware-apply-patch.sh run: .github/workflows/vmware-apply-patch.sh
- name: Create pull request for main - name: Create pull request for main
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v4
if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}