Skip to content

Commit a7a4e64

Browse files
authored
Merge pull request #38 from linuxserver/workflows4
update workflows
2 parents 3a1ded2 + 1e05e63 commit a7a4e64

File tree

3 files changed

+17
-32
lines changed

3 files changed

+17
-32
lines changed

.github/workflows/external_trigger.yml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,8 @@ jobs:
1717
exit 0
1818
fi
1919
echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_LDAP_AUTH_MASTER\"."
20-
echo "Setting env vars"
21-
EXT_RELEASE_TYPE='pip_version'
22-
EXT_PIP='python-ldap'
23-
BUILD_VERSION_ARG='LDAP_VERSION'
24-
LS_USER='linuxserver'
25-
LS_REPO='docker-ldap-auth'
26-
CONTAINER_NAME='ldap-auth'
27-
DOCKERHUB_IMAGE='linuxserver/ldap-auth'
28-
DEV_DOCKERHUB_IMAGE='lsiodev/ldap-auth'
29-
PR_DOCKERHUB_IMAGE='lspipepr/ldap-auth'
30-
DIST_IMAGE='alpine'
31-
MULTIARCH='true'
32-
CI='true'
33-
CI_WEB='true'
34-
CI_PORT='9000'
35-
CI_SSL='false'
36-
CI_DELAY='60'
37-
CI_DOCKERENV='TZ=US/Pacific'
38-
CI_AUTH='user:password'
39-
CI_WEBPATH='/test'
4020
echo "Retrieving external version"
41-
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/${EXT_PIP}/json" |jq -r '. | .info.version')
21+
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/python-ldap/json" |jq -r '. | .info.version')
4222
if [ -z "${EXT_RELEASE}" ]; then
4323
echo "Can't retrieve external version, exiting"
4424
FAILURE_REASON="Can't retrieve external version for ldap-auth branch master"
@@ -49,19 +29,24 @@ jobs:
4929
fi
5030
echo "External version: ${EXT_RELEASE}"
5131
echo "Retrieving last pushed version"
52-
image="${LS_USER}/ldap-auth"
32+
image="linuxserver/ldap-auth"
5333
tag="latest"
54-
token=$(curl -s \
55-
"https://auth.docker.io/token?scope=repository:${image}:pull&service=registry.docker.io" \
34+
token=$(curl -sX GET \
35+
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fldap-auth%3Apull" \
5636
| jq -r '.token')
57-
digest=$(curl -s \
58-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
59-
--header "Authorization: Bearer ${token}" \
60-
"https://registry-1.docker.io/v2/${image}/manifests/${tag}" \
61-
| jq -r '.config.digest')
37+
multidigest=$(curl -s \
38+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
39+
--header "Authorization: Bearer ${token}" \
40+
"https://ghcr.io/v2/${image}/manifests/${tag}" \
41+
| jq -r 'first(.manifests[].digest)')
42+
digest=$(curl -s \
43+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
44+
--header "Authorization: Bearer ${token}" \
45+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
46+
| jq -r '.config.digest')
6247
image_info=$(curl -sL \
6348
--header "Authorization: Bearer ${token}" \
64-
"https://registry-1.docker.io/v2/${image}/blobs/${digest}" \
49+
"https://ghcr.io/v2/${image}/blobs/${digest}" \
6550
| jq -r '.container_config')
6651
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
6752
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')

.github/workflows/external_trigger_scheduler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: External Trigger Scheduler
22

33
on:
44
schedule:
5-
- cron: '32 * * * *'
5+
- cron: '30 * * * *'
66
workflow_dispatch:
77

88
jobs:

.github/workflows/package_trigger_scheduler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
22

33
on:
44
schedule:
5-
- cron: '52 14 * * 4'
5+
- cron: '50 11 * * 5'
66
workflow_dispatch:
77

88
jobs:

0 commit comments

Comments
 (0)