Skip to content

[2023-12-21 20:06] automatic update of release lists #18

[2023-12-21 20:06] automatic update of release lists

[2023-12-21 20:06] automatic update of release lists #18

name: Process new Alpine docker tags
on:
workflow_dispatch:
push:
paths:
- .github/workflows/process-alpine-tags.yml
- 'docker-alpine-tags.txt'
- 'docker-alpine-glibc-tags.txt'
jobs:
tags:
name: Discover new docker tags
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
matrix: ${{ steps.tags.outputs.matrix }}
steps:
- name: Checkout this repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set dynamic matrix
id: tags
shell: bash
run: |
set -ueox pipefail
set +e
DOCKER_TAGS="$(
(
git log -p -1 ./docker-alpine-tags.txt && \
git log -p -1 ./docker-alpine-glibc-tags.txt
) \
| grep -P '^\+\w+' \
| sed -re 's/^\+//g'
)"
set -e
if [ "$DOCKER_TAGS" != "" ]; then
JSON_MATRIX="$(
echo -n "$DOCKER_TAGS" \
| tr '\n' ' ' \
| jq --slurp -c -R 'split(" ") | map({run: .}) | {include: .}'
)"
else
JSON_MATRIX=""
fi
echo "::set-output name=matrix::${JSON_MATRIX}"
echo "Continue to build Asterisk imags with followup alpine versions:"
echo "==============================================================="
echo -e "$DOCKER_TAGS"
echo
echo
echo "JSON payload:"
echo "==============================================================="
echo "$JSON_MATRIX" | jq
build-images:
name: Build Alpine-based Asterisk images
needs: tags
if: ${{ needs.tags.outputs.matrix != '' }}
uses: ./.github/workflows/build-alpine-images.yml
with:
docker-tags: ${{ needs.tags.outputs.matrix }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}