From 2082dc06443104b0af4b4d66f0e0bfc15c0b8912 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 6 Oct 2021 19:41:08 -0700 Subject: [PATCH] Keep Docker images updated --- .github/workflows/update-docker-inages.yml | 137 +++++++++++++++++++++ Dockerfile | 3 +- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-docker-inages.yml diff --git a/.github/workflows/update-docker-inages.yml b/.github/workflows/update-docker-inages.yml new file mode 100644 index 00000000..ab8c8caa --- /dev/null +++ b/.github/workflows/update-docker-inages.yml @@ -0,0 +1,137 @@ +name: Update Docker Images + +on: + schedule: + - cron: '0 1 * * *' + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + + variables: + name: Get version of base image + runs-on: ubuntu-20.04 + outputs: + versions: ${{ steps.version.outputs.matrix }} + git_tag: ${{ steps.tag.outputs.git_tag }} + docker_platforms: ${{ steps.vars.outputs.docker_platforms }} + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get latest tag + id: tag + run: | + tag=$(git tag --sort=-version:refname | head -n1) + echo "::set-output name=git_tag::${tag//v}" + - name: Checkout Repository at ${{ steps.tag.outputs.git_tag }} + uses: actions/checkout@v2 + with: + ref: v${{ steps.tag.outputs.git_tag }} + - name: Set Base image version + id: version + run: | + # enable after v0.22.0 nginx_alpine=library/nginx:$(grep -m1 "FROM.*nginx.*alpine" > / ### Base build image for alpine -FROM nginx:1.21.3-alpine as build-nginx-alpine +# docker.io/library/nginx is a temporary workaround for Dependabot to see this as different from the one used in Debian +FROM docker.io/library/nginx:1.21.3-alpine AS build-nginx-alpine RUN apk add --no-cache \ build-base \ pcre-dev \