Skip to content

Commit a112df9

Browse files
committed
Revert Changes
1 parent 7c2b120 commit a112df9

8 files changed

Lines changed: 8 additions & 87 deletions

.github/workflows/build-package-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,11 @@ jobs:
101101
python -m pytest -q tools/packaging_automation/tests/test_citus_package.py -k 'test_build_packages'
102102
env:
103103
PACKAGING_IMAGE_PLATFORM: "${{matrix.TARGET_PLATFORM}}"
104-
GH_TOKEN: ${{ steps.app.outputs.token }}
105104

106105
- name: Push images
107106
run: |
108107
export CURRENT_BRANCH=${GITHUB_REF##*/}
109108
./ci/push_images
110109
env:
111110
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
112-
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}
113-
GH_TOKEN: ${{ steps.app.outputs.token }}
111+
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}

.github/workflows/build-package.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,3 @@ jobs:
107107
env:
108108
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
109109
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}
110-
GH_TOKEN: ${{ steps.app.outputs.token }}

.github/workflows/image-health-check.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,8 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929

30-
- name: Create GitHub App token
31-
id: app
32-
uses: actions/create-github-app-token@v1
33-
with:
34-
app-id: ${{ vars.GH_APP_ID }}
35-
private-key: ${{ secrets.GH_APP_KEY }}
36-
owner: ${{ github.repository_owner }}
37-
38-
- name: Set GH_TOKEN for all steps
39-
run: echo "GH_TOKEN=${{ steps.app.outputs.token }}" >> $GITHUB_ENV
40-
4130
- name: Check out repository
4231
uses: actions/checkout@v6
43-
with:
44-
token: ${{ steps.app.outputs.token }}
45-
46-
- name: Configure git with x-access-token
47-
run: git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/"
4832

4933
- name: Update and check dockerfiles
5034
run: |
@@ -111,7 +95,6 @@ jobs:
11195
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
11296
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}
11397

114-
11598
- name: Clone tools repo for test
11699
run: git clone -b v0.8.35 --depth=1 https://github.com/citusdata/tools.git tools
117100

.github/workflows/update_package_properties.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,9 @@ jobs:
1818

1919
# Steps represent a sequence of tasks that will be executed as part of the job
2020
steps:
21-
- name: Create GitHub App token
22-
id: app
23-
uses: actions/create-github-app-token@v1
24-
with:
25-
app-id: ${{ vars.GH_APP_ID }}
26-
private-key: ${{ secrets.GH_APP_KEY }}
27-
owner: ${{ github.repository_owner }}
28-
29-
- name: Set GH_TOKEN for all steps
30-
run: echo "GH_TOKEN=${{ steps.app.outputs.token }}" >> $GITHUB_ENV
3121

3222
- name: Checkout repository
3323
uses: actions/checkout@v6
34-
with:
35-
token: ${{ steps.app.outputs.token }}
36-
37-
- name: Configure git with x-access-token
38-
run: git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/"
3924

4025
# Runs a single command using the runners shell
4126
- name: Clone Tools branch

build_packages

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,7 @@ fi
1717
project=$1
1818
buildtype=$2
1919

20-
if [ -z "${GH_TOKEN:-}" ]; then
21-
echo "$0: GH_TOKEN (GitHub App token) is required but not set" >&2
22-
exit 66
23-
fi
24-
25-
echo "header=\"Authorization: Bearer ${GH_TOKEN}\"" > ~/.curlrc
26-
27-
# ensuring GH_TOKEN usage for clones/fetches
28-
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
20+
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
2921

3022
name=$(git config --get user.name)
3123
email=$(git config --get user.email)
@@ -62,7 +54,7 @@ while read -r line; do
6254
continue
6355
fi
6456
args+="run --rm -v ${outputdir}:/packages -v ${buildfilesdir}/deb:/buildfiles:ro "
65-
args+="-e GH_TOKEN=${GH_TOKEN} -e DEBFULLNAME='${name}' -e DEBEMAIL='${email}' "
57+
args+="-e GITHUB_TOKEN=${GITHUB_TOKEN} -e DEBFULLNAME='${name}' -e DEBEMAIL='${email}' "
6658
args+="citusdata/packaging:${os}-${release}-all $buildtype\n"
6759
elif [[ "${os}" = 'centos' ]] || [[ "${os}" = 'fedora' ]] || [[ "${os}" = 'oraclelinux' ]]; then
6860
# shellcheck source=/dev/null
@@ -88,13 +80,13 @@ while read -r line; do
8880
fi
8981
pgshort=${pgversion//./}
9082
args+="run --rm -v ${outputdir}:/packages -v ${buildfilesdir}/rpm:/buildfiles:ro "
91-
args+="-e GH_TOKEN=${GH_TOKEN} -e RPM_PACKAGER='${packager}' "
83+
args+="-e GITHUB_TOKEN=${GITHUB_TOKEN} -e RPM_PACKAGER='${packager}' "
9284
args+="citusdata/packaging:${os}-${release}-pg${pgshort} $buildtype\n"
9385
done
9486
elif [[ "${os}" = 'pgxn' ]]; then
9587
if [[ "${project}" = 'citus' ]] && [[ "${buildtype}" = 'release' ]]; then
9688
args+="run --rm -v ${outputdir}:/packages -v ${buildfilesdir}/pgxn:/buildfiles:ro "
97-
args+="-e GH_TOKEN=${GH_TOKEN} citusdata/packaging:${os}-all $buildtype\n"
89+
args+="-e GITHUB_TOKEN=${GITHUB_TOKEN} citusdata/packaging:${os}-all $buildtype\n"
9890
else
9991
echo "skipping PGXN... unsupported for this build" >&2
10092
fi

scripts/fetch_and_build_deb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,7 @@ if [ -z "${pkglatest}" ]; then
8888
exit $noinput
8989
fi
9090

91-
# normalize token name (accept GH_TOKEN from CI) and fail fast — we only use installation tokens
92-
if [ -n "${GH_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
93-
export GITHUB_TOKEN="${GH_TOKEN}"
94-
fi
95-
96-
if [ -z "${GITHUB_TOKEN:-}" ]; then
97-
echo "$0: error: GITHUB_TOKEN (installation token) is required" >&2
98-
exit $noinput
99-
fi
100-
101-
# use installation token for curl and git; keep token file permission-restricted
102-
printf 'header="Authorization: token %s"\n' "${GITHUB_TOKEN}" > ~/.curlrc
103-
chmod 600 ~/.curlrc
91+
echo "header=\"Authorization: Bearer ${GITHUB_TOKEN}\"" > ~/.curlrc
10492
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
10593

10694
export NAME

scripts/fetch_and_build_pgxn

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,7 @@ if [ -z "${pkglatest}" ]; then
5050
exit $noinput
5151
fi
5252

53-
# normalize token name (accept GH_TOKEN from CI) and fail fast — we only use installation tokens
54-
if [ -n "${GH_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
55-
export GITHUB_TOKEN="${GH_TOKEN}"
56-
fi
57-
58-
if [ -z "${GITHUB_TOKEN:-}" ]; then
59-
echo "$0: error: GITHUB_TOKEN (installation token) is required" >&2
60-
exit $noinput
61-
fi
62-
63-
# use installation token for curl and git; keep token file permission-restricted
64-
printf 'header="Authorization: token %s"\n' "${GITHUB_TOKEN}" > ~/.curlrc
65-
chmod 600 ~/.curlrc
53+
echo "header=\"Authorization: Bearer ${GITHUB_TOKEN}\"" > ~/.curlrc
6654
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
6755

6856
cp -R /buildfiles/META.json "${builddir}"

scripts/fetch_and_build_rpm

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,7 @@ if [ -z "${pkglatest}" ]; then
8181
exit $noinput
8282
fi
8383

84-
# normalize token name (accept GH_TOKEN from CI) and fail fast — we only use installation tokens
85-
if [ -n "${GH_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
86-
export GITHUB_TOKEN="${GH_TOKEN}"
87-
fi
88-
89-
if [ -z "${GITHUB_TOKEN:-}" ]; then
90-
echo "$0: error: GITHUB_TOKEN (installation token) is required" >&2
91-
exit $noinput
92-
fi
93-
94-
# use installation token for curl and git; keep token file permission-restricted
95-
printf 'header="Authorization: token %s"\n' "${GITHUB_TOKEN}" > ~/.curlrc
96-
chmod 600 ~/.curlrc
84+
echo "header=\"Authorization: Bearer ${GITHUB_TOKEN}\"" > ~/.curlrc
9785
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
9886

9987
name=$(determine_name)

0 commit comments

Comments
 (0)