Skip to content

Commit

Permalink
Merge branch 'craigk5n:master' into Buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannon authored Sep 27, 2023
2 parents 37b0277 + ffcc233 commit 668c0f1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ jobs:
KEEP_LAST_N_IMAGES: 5
run: |
# Get list of tags
TAGS=$(curl -s -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_PASSWORD https://hub.docker.com/v2/repositories/$DOCKER_HUB_REPO/tags/?page_size=100 | jq -r '.results[].name')
RESPONSE=$(curl -s -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_PASSWORD -o /tmp/response.json -w "%{http_code}" https://hub.docker.com/v2/repositories/$DOCKER_HUB_REPO/tags/?page_size=100)
# Check HTTP Status Code
if [ "$RESPONSE" -ne 200 ]; then
echo "Failed to fetch tags, HTTP Response code is $RESPONSE"
cat /tmp/response.json
exit 1
fi
# Check for null JSON Response and Extract Tags
TAGS=$(jq -r '.results? | if type=="array" then .[].name else empty end' /tmp/response.json)
# Filter tags with "dev"
DEV_TAGS=$(echo "$TAGS" | grep dev)
# Sort tags and delete all except for the most recent N
COUNTER=0
for TAG in $(echo $TAGS | tr " " "\n" | sort -V)
for TAG in $(echo $DEV_TAGS | tr " " "\n" | sort -V)
do
if [ $COUNTER -ge $KEEP_LAST_N_IMAGES ]
then
Expand Down
4 changes: 4 additions & 0 deletions includes/xcal.php
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,10 @@ function curl_download($url) {
function parse_ical ( $cal_file, $source = 'file' ) {
global $errormsg, $importMd5, $tz;

// Replace instances of 'webcal://' with 'http://' since PHP's curl does not
// support it.
$cal_file = str_ireplace('webcal://', 'http://', $cal_file);

$importMd5 = '';
$ical_data = [];
do_debug ( "in parse_ical, file=$cal_file, source=$source" );
Expand Down

0 comments on commit 668c0f1

Please sign in to comment.