Skip to content

Build and push docker images #662

Build and push docker images

Build and push docker images #662

Workflow file for this run

name: Build and push docker images
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
get_base_tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get-base-tags.outputs.tags }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get base tags
id: get-base-tags
run: |
tags=$(./get_base_tags.sh --json)
echo "tags=$tags" >> $GITHUB_OUTPUT
build_push:
runs-on: ubuntu-latest
needs: get_base_tags
# Dynamically generate a job for each tag we found in step before
strategy:
matrix:
tag: ${{ fromJson(needs.get_base_tags.outputs.tags) }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push ${{ matrix.tag }}
run: ./build.sh --build --push --base-tag ${{ matrix.tag }}