Skip to content

Configure Renovate - autoclosed #28

Configure Renovate - autoclosed

Configure Renovate - autoclosed #28

Workflow file for this run

name: Docker
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- "*"
# Run tests for any PRs.
pull_request:
jobs:
# See also https://docs.docker.com/docker-hub/builds/
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Build image
run: DOCKER_BUILDKIT=1 docker build . --file Dockerfile.ci --tag image
- name: Log into registry
run: echo "${{ secrets.DOCKER_REGISTRY_TOKEN }}" | docker login --username cwrau --password-stdin
- name: Push image
run: |
IMAGE_ID=cwrau/webserver
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag image $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION