Skip to content

Build polmineR OpenCPU Image #178

Build polmineR OpenCPU Image

Build polmineR OpenCPU Image #178

name: Build polmineR OpenCPU Image
on:
workflow_run:
workflows: ["Build polmineR Dev Image","Build polmineR Stable Image"]
types:
- completed
jobs:
build-opencpuimage:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get Version Master
run: |
echo "POLMINE_VERSION_MASTER=$(wget -qO- https://raw.githubusercontent.com/PolMine/polmineR/master/DESCRIPTION | grep "Version:" | sed 's/^.*: //')" >> $GITHUB_ENV
-
name: Get Version Dev
run: |
echo "POLMINE_VERSION_DEV=$(wget -qO- https://raw.githubusercontent.com/PolMine/polmineR/dev/DESCRIPTION | grep "Version:" | sed 's/^.*: //')" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx Master
uses: docker/setup-buildx-action@v1
id: master
-
name: Set up Docker Buildx Dev
uses: docker/setup-buildx-action@v1
id: dev
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CR_OWNER }}
password: ${{ secrets.CR_PAT }}
-
name: Build and push Master
uses: docker/build-push-action@v2
with:
context: .
file: ./Docker/polminer-opencpu/Dockerfile
builder: ${{ steps.master.outputs.name }}
platforms: linux/amd64
push: true
tags: |
ghcr.io/polmine/polminer-opencpu:latest
ghcr.io/polmine/polminer-opencpu:${{env.POLMINE_VERSION_MASTER}}
-
name: Build and push Dev
uses: docker/build-push-action@v2
with:
context: .
file: ./Docker/polminer-opencpu/Dockerfile
builder: ${{ steps.dev.outputs.name }}
platforms: linux/amd64
push: true
build-args: PARENT_IMAGE=ghcr.io/polmine/polminer-dev:latest
tags: |
ghcr.io/polmine/polminer-opencpu-dev:latest
ghcr.io/polmine/polminer-opencpu-dev:${{env.POLMINE_VERSION_DEV}}