Skip to content

CI: try and use latest actions to get rid of deprecation warnings #119

CI: try and use latest actions to get rid of deprecation warnings

CI: try and use latest actions to get rid of deprecation warnings #119

Workflow file for this run

name: Releases
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
# The following is a clone of cs3org/reva/.github/workflows/docker.yml because reusable actions do not (yet) support lists as input types:
# see https://github.com/community/community/discussions/11692
release:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'cs3org/wopiserver'] }}
strategy:
fail-fast: false
matrix:
include:
- file: wopiserver.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-amd64
platform: linux/amd64
image: python:3.11-alpine
push: ${{ github.event_name != 'workflow_dispatch' }}
- file: wopiserver.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-arm64
platform: linux/arm64
image: python:3.10-slim-buster
push: ${{ github.event_name != 'workflow_dispatch' }}
- file: wopiserver-xrootd.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-xrootd
platform: linux/amd64
push: ${{ github.event_name != 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.platform != ''
uses: docker/setup-qemu-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action
- name: Login to Docker Hub
if: matrix.push
uses: docker/login-action
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build ${{ matrix.push && 'and push' || '' }} ${{ matrix.tags }} Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ${{ matrix.file }}
tags: ${{ matrix.tags }}
push: ${{ matrix.push }}
build-args: |
VERSION=${{ github.ref_name }}
BASEIMAGE=${{ matrix.image }}
platforms: ${{ matrix.platform }}
manifest:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'cs3org/wopiserver'] }}
needs: release
if: github.event_name != 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
manifest:
- ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}
- ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:latest
steps:
- name: Login to Docker Hub
uses: docker/login-action
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create manifest
run: |
docker manifest create ${{ matrix.manifest }} \
--amend ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-amd64 \
--amend ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-arm64
- name: Push manifest
run: docker manifest push ${{ matrix.manifest }}