Build polmineR OpenCPU Image #188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |