mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Refactor to Ulf's suggestions
This commit is contained in:
parent
b57e1f23e2
commit
ef1b2e7b7f
30
.github/workflows/publish.yml
vendored
30
.github/workflows/publish.yml
vendored
@ -1,9 +1,10 @@
|
|||||||
name: ocelot.social publish branded CI
|
name: ocelot.social publish branded CI
|
||||||
|
|
||||||
on:
|
# Wolle on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- master
|
# - master
|
||||||
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -98,25 +99,20 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
- name: ENV - VERSION
|
- name: ENV - VERSION
|
||||||
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||||
- name: ENV - BUILD_NUMBER
|
- name: ENV - OCELOT_DOCKER_VERSION_TAG
|
||||||
run: echo "BUILD_NUMBER=$(node -p -e "require('./package.json').build-number")" >> $GITHUB_ENV
|
run: echo "OCELOT_DOCKER_VERSION_TAG=$(node -p -e "require('./package.json').ocelot-docker-version-tag")" >> $GITHUB_ENV
|
||||||
- name: ENV - DOCKER_ORGANISATION_SOURCE
|
- name: ENV - DOCKER_ORGANISATION
|
||||||
run: echo "DOCKER_ORGANISATION_SOURCE=$(node -p -e "require('./package.json').docker-organisation-source")" >> $GITHUB_ENV
|
run: echo "DOCKER_ORGANISATION=$(node -p -e "require('./package.json').docker-organisation")" >> $GITHUB_ENV
|
||||||
- name: ENV - DOCKER_ORGANISATION_PUSH
|
# this is oriented on the node docker version tag "node:12.19.0-alpine3.10" and looks like "app-branded:1.0.2-3-ocelot.social1.0.2-79"
|
||||||
run: echo "DOCKER_ORGANISATION_PUSH=$(node -p -e "require('./package.json').docker-organisation-push")" >> $GITHUB_ENV
|
|
||||||
- name: ENV - BUILD_DATE
|
|
||||||
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
|
||||||
- name: ENV - BUILD_VERSION
|
- name: ENV - BUILD_VERSION
|
||||||
run: echo "BUILD_VERSION=${VERSION}-${BUILD_NUMBER}" >> $GITHUB_ENV
|
run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}-ocelot.social${OCELOT_DOCKER_VERSION_TAG}" >> $GITHUB_ENV
|
||||||
- name: ENV - BUILD_COMMIT
|
|
||||||
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# BUILD WEBAPP DOCKER IMAGE (build) ######################################
|
# BUILD WEBAPP DOCKER IMAGE (build) ######################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
- name: webapp | Build `branded` image
|
- name: webapp | Build `branded` image
|
||||||
run: |
|
run: |
|
||||||
docker build --target branded -t "${DOCKER_ORGANISATION_PUSH}/webapp-branded:latest" -t "${DOCKER_ORGANISATION_PUSH}/webapp-branded:${VERSION}" -t "${DOCKER_ORGANISATION_PUSH}/webapp-branded:${BUILD_VERSION}" -f docker/webapp.Dockerfile --build-arg APP_IMAGE=${DOCKER_ORGANISATION_SOURCE}/webapp:${BUILD_VERSION} .
|
docker build --target branded -t "${DOCKER_ORGANISATION}/webapp-branded:latest" -t "${DOCKER_ORGANISATION}/webapp-branded:${BUILD_VERSION}" -f docker/webapp.Dockerfile --build-arg APP_IMAGE=ocelotsocialnetwork/webapp:${OCELOT_DOCKER_VERSION_TAG} .
|
||||||
docker save "${DOCKER_ORGANISATION_PUSH}/webapp-branded" > /tmp/webapp-branded.tar
|
docker save "${DOCKER_ORGANISATION}/webapp-branded" > /tmp/webapp-branded.tar
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@ -5,9 +5,9 @@ version: "1.0.0"
|
|||||||
# The appVersion defines which docker image is pulled.
|
# The appVersion defines which docker image is pulled.
|
||||||
# Having it set to latest will pull the latest build on dockerhub.
|
# Having it set to latest will pull the latest build on dockerhub.
|
||||||
# You are free to define a specific version here tho.
|
# You are free to define a specific version here tho.
|
||||||
# e.g. appVersion: "1.0.2-79"
|
# e.g. appVersion: "latest" or "1.0.2-3-ocelot.social1.0.2-79"
|
||||||
# Be aware that this requires all your apps to have the same docker image version available.
|
# Be aware that this requires all your apps to have the same docker image version available.
|
||||||
appVersion: "1.0.2-79"
|
appVersion: "latest"
|
||||||
description: The Helm chart for ocelot.social
|
description: The Helm chart for ocelot.social
|
||||||
home: https://ocelot.social
|
home: https://ocelot.social
|
||||||
sources:
|
sources:
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "ocelot-social-branded",
|
"name": "ocelot-social-branded",
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"build-number": "79",
|
"ocelot-docker-version-tag": "1.0.2-79",
|
||||||
"docker-organisation-source": "ocelotsocialnetwork",
|
"docker-organisation": "ocelotsocialnetwork",
|
||||||
"docker-organisation-push": "ocelotsocialnetwork",
|
|
||||||
"description": "Ocelot Social Branded",
|
"description": "Ocelot Social Branded",
|
||||||
"author": "ocelot.social Community",
|
"author": "ocelot.social Community",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user