Skip to content

Update docker base image #894

Update docker base image

Update docker base image #894

Workflow file for this run

name: Update docker base image
## Update the base image every day
on:
workflow_dispatch:
schedule:
## In UTC
- cron: '0 0 * * *'
## Build base images to be used by other github workflows
jobs:
build:
name: Update base Erlang/OTP build images
if: github.repository == 'erlang/otp'
runs-on: ubuntu-latest
strategy:
matrix:
type: [debian-base,ubuntu-base,i386-debian-base]
branch: [master, maint, maint-25]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: Docker login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
id: base
run: >-
BASE_TAG=ghcr.io/${{ github.repository_owner }}/otp/${{ matrix.type }}
BASE_USE_CACHE=false
.github/scripts/build-base-image.sh "${{ matrix.branch }}"
- name: Push master image
if: matrix.branch == 'master'
run: docker push ${{ steps.base.outputs.BASE_TAG }}:latest
- name: Tag and push base image
run: |
docker tag ${{ steps.base.outputs.BASE_TAG }}:latest \
${{ steps.base.outputs.BASE_TAG }}:${{ matrix.branch }}
docker push ${{ steps.base.outputs.BASE_TAG }}:${{ matrix.branch }}