Skip to content

Docker Image CI

Docker Image CI #25

Workflow file for this run

name: Docker Image CI
on:
workflow_dispatch:
inputs:
version:
description: "The warp version you want to build"
required: true
latest:
description: "tag as latest"
required: false
default: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_REPO }}
sep-labels: ','
- name: Docker tag
id: tag
run: |
VERSION=${{ github.event.inputs.version }}
if [[ ${{ github.event.inputs.latest }} == true ]]; then VERSION="$VERSION,latest" ; fi
echo "::set-output name=tag::$VERSION"
LABELS=$(echo ${{ steps.meta.outputs.labels }} | sed -e 's/\s/-/g')
echo "::set-output name=labels::$LABELS"
- name: Docker Build & Push Version
uses: mr-smithers-excellent/docker-build-push@v5.6
with:
registry: docker.io
image: ${{ secrets.DOCKERHUB_REPO }}
tags: ${{ steps.tag.outputs.tag }}
labels: ${{ steps.tag.outputs.lables }}
buildArgs: VERSION=${{ github.event.inputs.version }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}