Skip to content

nextlcou version 26.0.10 #1

nextlcou version 26.0.10

nextlcou version 26.0.10 #1

Workflow file for this run

name: Publish Image to Docker
on:
push:
tags:
- "[0-9]*"
jobs:
publish_docker_image:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Docker meta service name for DockerHub development image
id: docker_meta_img_dev
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository }}/dev
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Docker meta service name for DockerHub production image
id: docker_meta_img_prod
uses: docker/metadata-action@v3
with:
images: |
schulcloud/schulcloud-nextcloud
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Log into DockerHub registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log into GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push ${{ github.repository }} production image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
target: production
tags: ${{ steps.docker_meta_img_prod.outputs.tags }}
labels: ${{ steps.docker_meta_img_prod.outputs.labels }}
- name: Build and push ${{ github.repository }} development image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
target: development
tags: ${{ steps.docker_meta_img_dev.outputs.tags }}
labels: ${{ steps.docker_meta_img_dev.outputs.labels }}