Skip to content

updated README

updated README #2

Workflow file for this run

on:
push:
branches: [main, master]
paths:
- Dockerfile
- .github/workflows/docker-image.yaml
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Extra tag to push alongside latest/<sha> (e.g. 1.0.2)
required: false
default: ""
name: docker-image.yaml
permissions: read-all
jobs:
build-and-push:
runs-on: ubuntu-latest
concurrency:
group: docker-image-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE: lperlaza/shinycellmodular
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Compute tags
id: tags
run: |
PKG_VERSION=$(grep '^Version:' DESCRIPTION | head -1 | sed 's/^Version:[[:space:]]*//')
TAGS="$IMAGE:latest"$'\n'"$IMAGE:$GITHUB_SHA"$'\n'"$IMAGE:$PKG_VERSION"
if [ -n "${{ github.event.inputs.tag }}" ]; then
TAGS="$TAGS"$'\n'"$IMAGE:${{ github.event.inputs.tag }}"
fi
{
echo "tags<<EOF"
echo "$TAGS"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.tags.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max