Skip to content

Revert "Fix optparse-applicative module breakage; and freeze app depe… #289

Revert "Fix optparse-applicative module breakage; and freeze app depe…

Revert "Fix optparse-applicative module breakage; and freeze app depe… #289

Workflow file for this run

name: Docker
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
tags: [ "*.*.*" ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-20.04 ]
target: [ kupo ]
runs-on: ${{ matrix.os }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: 🧰 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🧐 hadolint
uses: hadolint/[email protected]
with:
dockerfile: "./Dockerfile"
failure-threshold: warning
ignore: DL3059, SC2086, DL3029
- name: 🐳 Login to DockerHub
if: ${{ github.event_name == 'push' }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: 📝 Base Variables
id: base-variables
run: |
echo "image=cardanosolutions/${{ matrix.target }}" >> $GITHUB_OUTPUT
- name: 📝 Tag Variables
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
id: tag-variables
run: |
echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: 🔨 Build and push (latest)
if: ${{ github.event_name == 'push' }}
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.base-variables.outputs.image }}:latest
target: ${{ matrix.target }}
cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest
cache-to: type=inline
- name: 🏷️ Build and push (tag)
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.base-variables.outputs.image }}:${{ steps.tag-variables.outputs.tag }}
target: ${{ matrix.target }}
cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest
cache-to: type=inline