ci(test): add missing args for docker build (#17) #1
Workflow file for this run
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: Docker | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up the repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Release check | |
id: release | |
run: | | |
if [[ ${{ github.ref_name }} =~ ^bp-(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then | |
echo "release=true" >> $GITHUB_OUTPUT | |
else | |
echo "release=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: cytomineuliege/pims | |
tags: | | |
type=raw,value=${{ github.ref_name }} | |
type=raw,value=latest,enable=${{ steps.release.outputs.release }} | |
- name: Build and push pims | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: | | |
BMI=${{ secrets.BMI }} | |
CF=${{ secrets.CF }} | |
ENTRYPOINT_SCRIPTS_VERSION=${{ vars.ENTRYPOINT_SCRIPTS_VERSION }} | |
GUNICORN_VERSION=${{ vars.GUNICORN_VERSION }} | |
OPENJPEG_URL=${{ vars.OPENJPEG_URL }} | |
OPENJPEG_VERSION=${{ vars.OPENJPEG_VERSION }} | |
PIMS_REVISION=${{ github.sha }} | |
PIMS_VERSION=${{ github.ref_name }} | |
PY_VERSION=${{ vars.PYTHON_VERSION }} | |
SETUPTOOLS_VERSION=${{ vars.SETUPTOOLS_VERSION }} | |
UBUNTU_VERSION=${{ vars.UBUNTU_VERSION }} | |
VIPS_URL=${{ vars.VIPS_URL }} | |
VIPS_VERSION=${{ vars.VIPS_VERSION }} | |
context: . | |
file: ./docker/backend.dockerfile | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-worker | |
uses: docker/metadata-action@v5 | |
with: | |
images: cytomineuliege/pims-worker | |
tags: | | |
type=raw,value=${{ github.ref_name }} | |
type=raw,value=latest,enable=${{ steps.release.outputs.release }} | |
- name: Build and push pims-worker | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: | | |
FROM_NAMESPACE=cytomineuliege | |
FROM_VERSION=${{ github.ref_name }} | |
context: . | |
file: ./docker/worker.dockerfile | |
labels: ${{ steps.meta-worker.outputs.labels }} | |
push: true | |
tags: ${{ steps.meta-worker.outputs.tags }} |