Skip to content

chore: change scheduled build day from Saturday to Thursday #90

chore: change scheduled build day from Saturday to Thursday

chore: change scheduled build day from Saturday to Thursday #90

Workflow file for this run

name: demyx/docker-socket-proxy
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 4'
jobs:
master:
runs-on: ubuntu-latest
env:
DEMYX_REPOSITORY: docker-socket-proxy
DEMYX_VERSION: 1.10.0
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Login
uses: docker/login-action@v4
with:
username: demyx
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: |
docker pull tecnativa/docker-socket-proxy
docker build -t demyx/${{ env.DEMYX_REPOSITORY }} -t demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION }} -t demyx/${{ env.DEMYX_REPOSITORY }}:v1 .
- name: Test
id: test
shell: 'script -q -e -c "bash {0}"'
run: |
docker run -d --name=${{ env.DEMYX_REPOSITORY }} demyx/${{ env.DEMYX_REPOSITORY }}
DEMYX_TEST="$(docker exec ${{ env.DEMYX_REPOSITORY }} cat /usr/local/etc/haproxy/haproxy.cfg)"
if [[ "$DEMYX_TEST" == *"bind :2375"* ]]; then
echo "$DEMYX_TEST"
else
exit 1
fi
- name: Version
run: |
DEMYX_DOCKER_SOCKET_PROXY_ALPINE_VERSION="$(docker exec ${{ env.DEMYX_REPOSITORY }} cat /etc/os-release | grep VERSION_ID | cut -c 12-)"
DEMYX_DOCKER_SOCKET_PROXY_HAPROXY_VERSION="$(docker exec ${{ env.DEMYX_REPOSITORY }} haproxy -v | grep -Eom1 '[0-9]+\.[0-9]+(\.[0-9]+)+')"
DEMYX_JQ="$(jq ".alpine = \"$DEMYX_DOCKER_SOCKET_PROXY_ALPINE_VERSION\" | .docker_socket_proxy = \"$DEMYX_DOCKER_SOCKET_PROXY_HAPROXY_VERSION\"" version.json)"
# Update versions
echo "$DEMYX_JQ" > version.json
echo "DEMYX_DOCKER_SOCKET_PROXY_ALPINE_VERSION=$DEMYX_DOCKER_SOCKET_PROXY_ALPINE_VERSION
DEMYX_DOCKER_SOCKET_PROXY_HAPROXY_VERSION=$DEMYX_DOCKER_SOCKET_PROXY_HAPROXY_VERSION" > VERSION
- name: Push
run: |
# Not sure why this is being created?
[[ -f typescript ]] && rm -f typescript
DEMYX_CHECK_STATUS="$(git status)"
if [[ "$DEMYX_CHECK_STATUS" != *"nothing to commit"* ]]; then
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
git remote set-url origin https://demyxsh:${{ secrets.DEMYX_TOKEN }}@github.com/demyxsh/${{ env.DEMYX_REPOSITORY }}
git add .
git commit -m "Schedule Build #${{ github.run_id }}"
git push
fi
docker push demyx/${{ env.DEMYX_REPOSITORY }}
docker push demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION }}
docker push demyx/${{ env.DEMYX_REPOSITORY }}:v1