Skip to content

Twiddle

Twiddle #22

Workflow file for this run

name: hadolint
on:
push:
branches: [ main ]
paths:
- 'hadolint/**'
pull_request:
branches: [ main ]
paths:
- 'hadolint/**'
workflow_dispatch:
jobs:
prepare:
runs-on: ubuntu-latest
defaults:
run:
working-directory: hadolint
outputs:
targets: ${{ steps.list-targets.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: List targets
id: list-targets
uses: docker/bake-action/subaction/list-targets@v4
build:
runs-on: ubuntu-latest
needs:
- prepare
defaults:
run:
working-directory: hadolint
steps:
- name: Install QEMU static binaries
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/bake-action@v4
with:
workdir: hadolint
push: ${{ github.event_name != 'pull_request' }}
- name: List targets
id: foo
if: github.event_name != 'pull_request'
uses: docker/bake-action/subaction/list-targets@v4
with:
workdir: hadolint
- name: Update Docker Hub Description
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }}
repository: boxcutter/hadolint
# short-description: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}
readme-filepath: hadolint/README.md