Skip to content

Docker build and push #41

Docker build and push

Docker build and push #41

Workflow file for this run

name: Docker build and push
on:
push:
branches:
- master
pull_request:
schedule:
- cron: 0 2 * * 0
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: hadolint/[email protected]
if: github.event_name == 'pull_request'
with:
dockerfile: Dockerfile
config: hadolint-ci.yaml
- name: Build images
run: docker buildx bake
- name: Log into registry
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login https://index.docker.io/v1/ -u ${{ secrets.DOCKER_USER }} --password-stdin
- name: Push images
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: docker buildx bake --push