-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(actions) also generate rolling (#687)
- Loading branch information
Showing
10 changed files
with
141 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.12.1 | ||
1.13.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#! /usr/bin/env bash | ||
|
||
for i in "$@" | ||
do | ||
case $i in | ||
-o=* | --organization=* ) | ||
ORGANIZATION="${i#*=}" | ||
;; | ||
-t=* | --type=* ) | ||
PACKAGE_TYPE="${i#*=}" | ||
;; | ||
--token=* ) | ||
TOKEN="${i#*=}" | ||
;; | ||
* ) | ||
# unknown option | ||
if [[ -n "${i}" ]] # Ignore empty arguments | ||
then | ||
echo -e "\e[35m\e[1mUnknown input argument '${i}'. Check CI .yml file\e[0m" | ||
exit 1 | ||
fi | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
echo -e "\e[35m\e[1mORGANIZATION = ${ORGANIZATION}\e[0m" | ||
echo -e "\e[35m\e[1mPACKAGE_TYPE = ${PACKAGE_TYPE}\e[0m" | ||
echo -e "\e[35m\e[1mTOKEN length = ${#TOKEN}\e[0m" | ||
|
||
echo "::group::curl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\"" | ||
echo -e "\e[1mcurl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\"" | ||
output=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${TOKEN}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1") | ||
echo -e "${output}" | jq -C | ||
echo "::endgroup::" | ||
|
||
echo -e "\e[1mjq -r '.[].name'\e[0m" | ||
packages=$(jq -r '.[].name' <<< "${output}") | ||
echo -e "\e[35m\e[1mpackages:\e[0m" | ||
for pkg in ${packages} | ||
do | ||
echo -e "\e[35m\e[1m ${pkg}\e[0m" | ||
packages_list="${packages_list:+$packages_list, }'${pkg}'" | ||
done | ||
packages_list="[${packages_list}]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Organization packages' | ||
description: 'Get the names of the packages in an organization' | ||
inputs: | ||
package-type: | ||
description: 'Type of the packages' | ||
required: true | ||
type: string | ||
default: 'container' | ||
organization: | ||
description: 'Name of the organization' | ||
required: true | ||
type: string | ||
default: ${{ github.repository_owner }} | ||
token: | ||
description: 'GitHub token' | ||
required: true | ||
type: string | ||
default: ${{ github.token }} | ||
outputs: | ||
packages: | ||
description: 'Package names' | ||
value: ${{ steps.packages.outputs.packages }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Organization packages | ||
id: packages | ||
run: | | ||
source ${{ github.action_path }}/../organization-packages.sh --organization=${{ inputs.organization }} --type=${{ inputs.package-type }} --token=${{ inputs.token }} | ||
echo -e "\e[35m\e[1mpackages=${packages_list} >> \${GITHUB_OUTPUT}\e[0m" | ||
echo "packages=${packages_list}" >> ${GITHUB_OUTPUT} | ||
shell: bash --noprofile --norc -o pipefail {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters