Skip to content

Honeypot: JSON sent should be read on one line. #431

Honeypot: JSON sent should be read on one line.

Honeypot: JSON sent should be read on one line. #431

name: Build and publish Docker Hub images
on:
push:
branches:
- 'main'
- '[0-9].x'
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels) for standard image
id: meta
uses: docker/metadata-action@v5
with:
images: computablefacts/towerify
flavor: |
latest=false
tags: |
# set latest tag only for default branch
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=pep440,pattern={{version}}
type=pep440,pattern={{major}}.{{minor}}
type=pep440,pattern={{major}}
type=sha,prefix=sha-,format=short
type=sha,prefix=sha-,format=long
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: ./towerify/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=computablefacts/towerify:buildcache
cache-to: type=registry,ref=computablefacts/towerify:buildcache,mode=max