Skip to content

Commit 3409748

Browse files
committed
Fix build automations
Update checkout and artifact versions GPG key import mechanism reworked and using a functional server Fix deprecated environment use
1 parent f22e60e commit 3409748

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
- name: Extract tag/branch variables
99
shell: bash
1010
run: |
11-
echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/}|grep -v '/')"
12-
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/}|grep -v '/')"
11+
echo "tag=$(echo ${GITHUB_REF#refs/tags/}|grep -v '/')" >> $GITHUB_OUTPUT
12+
echo "branch=$(echo ${GITHUB_REF#refs/heads/}|grep -v '/')" >> $GITHUB_OUTPUT
1313
id: extract
1414
outputs:
1515
tag: ${{ steps.extract.outputs.tag }}
@@ -20,7 +20,7 @@ jobs:
2020
name: Build package
2121
needs: prep
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
- name: Set up build tools
2525
run: ./.github/workflows/setup.sh
2626
- name: Server-side run of commit hooks in case developer skipped them
@@ -34,7 +34,7 @@ jobs:
3434
./packaging/gpg-recv-key [email protected] "4DFF 624A E564 3B51 2872 1F40 29CA 3358 89B9 A863"
3535
git fetch --tags -f
3636
env:
37-
KEYSERVER: pool.sks-keyservers.net
37+
KEYURL: https://keyserver.ubuntu.com/pks/lookup?exact=on&op=get&search=
3838
- name: Run build
3939
run: fakeroot ./packaging/git-build && ./configure && make check
4040
env:
@@ -47,7 +47,7 @@ jobs:
4747
sha512sum -b $i > $i.sha
4848
done
4949
- name: Upload build artifacts
50-
uses: actions/upload-artifact@v2
50+
uses: actions/upload-artifact@v4
5151
with:
5252
name: build-artifacts
5353
path: |
@@ -69,7 +69,7 @@ jobs:
6969
|| startsWith( needs.prep.outputs.branch, 'stable-' ) ) }}
7070
steps:
7171
- name: Download artifacts
72-
uses: actions/download-artifact@v2
72+
uses: actions/download-artifact@v4.1.7
7373
with:
7474
name: build-artifacts
7575
- name: Setup SSH
@@ -80,8 +80,8 @@ jobs:
8080
eval "$(ssh-agent)"
8181
if ssh-add firehol_org_publish_key; then
8282
echo "Key added: setting agent environment"
83-
echo "##[set-output name=ssh_agent_pid;]$SSH_AGENT_PID"
84-
echo "##[set-output name=ssh_auth_sock;]$SSH_AUTH_SOCK"
83+
echo "ssh_agent_pid=$SSH_AGENT_PID" >> $GITHUB_OUTPUT
84+
echo "ssh_auth_sock=$SSH_AUTH_SOCK" >> $GITHUB_OUTPUT
8585
mkdir -p $HOME/.ssh
8686
chmod 700 $HOME/.ssh
8787
echo PasswordAuthentication=no >> $HOME/.ssh/config
@@ -135,7 +135,7 @@ jobs:
135135
if: ${{ needs.prep.outputs.tag != '' }}
136136
steps:
137137
- name: Download artifacts
138-
uses: actions/download-artifact@v2
138+
uses: actions/download-artifact@v4.1.7
139139
with:
140140
name: build-artifacts
141141
- name: Create Release

packaging/gpg-recv-key

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
22

3-
if [ ! "$KEYSERVER" ]
3+
if [ ! "$KEYURL" ]
44
then
5-
echo "No KEYSERVER environment set, e.g.:"
6-
echo " export KEYSERVER=hkps://hkps.pool.sks-keyservers.net"
5+
echo "No KEYURL environment set, e.g.:"
6+
echo " export KEYURL='https://keyserver.ubuntu.com/pks/lookup?exact=on&op=get&search='"
77
exit 1
88
fi
99

@@ -30,9 +30,10 @@ fingerprint="$2"
3030
# Modern GPG can import key by fingerprint but the version available
3131
# within travis currently does not, so we extract the short version and
3232
# check it matches manually
33-
key=`echo $fingerprint | cut -f7-10 -d' ' | tr -d ' '`
33+
key=`echo $fingerprint | tr -d ' '`
3434

35-
gpg --keyserver "$KEYSERVER" --recv-key "$key" || exit 1
35+
curl -o/tmp/keydata.asc "${KEYURL}0x$key" || exit 1
36+
gpg --import /tmp/keydata.asc || exit 1
3637
gpg --fingerprint "$key" > /tmp/keystatus.$$
3738
status=$?
3839

0 commit comments

Comments
 (0)