mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
change publishing workflow for temporary changelog testing
This commit is contained in:
parent
5359f4a8bf
commit
9cb91c47e1
490
.github/workflows/publish.yml
vendored
490
.github/workflows/publish.yml
vendored
@ -3,236 +3,236 @@ name: publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- test-autoformatted-changelog
|
||||
|
||||
jobs:
|
||||
##############################################################################
|
||||
# JOB: DOCKER BUILD COMMUNITY NEO4J ##########################################
|
||||
##############################################################################
|
||||
build_production_neo4j:
|
||||
name: Docker Build Production - Neo4J
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
- name: Neo4J | Build `community` image
|
||||
run: |
|
||||
docker build --target community \
|
||||
--tag "ocelotsocialnetwork/neo4j-community:latest" \
|
||||
--tag "ocelotsocialnetwork/neo4j-community:${VERSION}" \
|
||||
--tag "ocelotsocialnetwork/neo4j-community:${BUILD_VERSION}" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
neo4j/
|
||||
- name: Neo4J | Save docker image
|
||||
run: docker save "ocelotsocialnetwork/neo4j-community" > /tmp/neo4j.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker-neo4j-community
|
||||
path: /tmp/neo4j.tar
|
||||
# build_production_neo4j:
|
||||
# name: Docker Build Production - Neo4J
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# - name: Setup env
|
||||
# run: |
|
||||
# echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# - name: Neo4J | Build `community` image
|
||||
# run: |
|
||||
# docker build --target community \
|
||||
# --tag "ocelotsocialnetwork/neo4j-community:latest" \
|
||||
# --tag "ocelotsocialnetwork/neo4j-community:${VERSION}" \
|
||||
# --tag "ocelotsocialnetwork/neo4j-community:${BUILD_VERSION}" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# neo4j/
|
||||
# - name: Neo4J | Save docker image
|
||||
# run: docker save "ocelotsocialnetwork/neo4j-community" > /tmp/neo4j.tar
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: docker-neo4j-community
|
||||
# path: /tmp/neo4j.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: DOCKER BUILD PRODUCTION BACKEND #######################################
|
||||
##############################################################################
|
||||
build_production_backend:
|
||||
name: Docker Build Production - Backend
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
- name: Backend | Build `production` image
|
||||
run: |
|
||||
docker build --target base \
|
||||
--tag "ocelotsocialnetwork/backend:latest-base" \
|
||||
--tag "ocelotsocialnetwork/backend:${VERSION}-base" \
|
||||
--tag "ocelotsocialnetwork/backend:${BUILD_VERSION}-base" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
backend/
|
||||
docker build --target code \
|
||||
--tag "ocelotsocialnetwork/backend:latest-code" \
|
||||
--tag "ocelotsocialnetwork/backend:${VERSION}-code" \
|
||||
--tag "ocelotsocialnetwork/backend:${BUILD_VERSION}-code" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
backend/
|
||||
docker build --target production \
|
||||
--tag "ocelotsocialnetwork/backend:latest" \
|
||||
--tag "ocelotsocialnetwork/backend:${VERSION}" \
|
||||
--tag "ocelotsocialnetwork/backend:${BUILD_VERSION}" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
backend/
|
||||
- name: Backend | Save docker image
|
||||
run: docker save "ocelotsocialnetwork/backend" > /tmp/backend.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker-backend-production
|
||||
path: /tmp/backend.tar
|
||||
# build_production_backend:
|
||||
# name: Docker Build Production - Backend
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# - name: Setup env
|
||||
# run: |
|
||||
# echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# - name: Backend | Build `production` image
|
||||
# run: |
|
||||
# docker build --target base \
|
||||
# --tag "ocelotsocialnetwork/backend:latest-base" \
|
||||
# --tag "ocelotsocialnetwork/backend:${VERSION}-base" \
|
||||
# --tag "ocelotsocialnetwork/backend:${BUILD_VERSION}-base" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# backend/
|
||||
# docker build --target code \
|
||||
# --tag "ocelotsocialnetwork/backend:latest-code" \
|
||||
# --tag "ocelotsocialnetwork/backend:${VERSION}-code" \
|
||||
# --tag "ocelotsocialnetwork/backend:${BUILD_VERSION}-code" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# backend/
|
||||
# docker build --target production \
|
||||
# --tag "ocelotsocialnetwork/backend:latest" \
|
||||
# --tag "ocelotsocialnetwork/backend:${VERSION}" \
|
||||
# --tag "ocelotsocialnetwork/backend:${BUILD_VERSION}" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# backend/
|
||||
# - name: Backend | Save docker image
|
||||
# run: docker save "ocelotsocialnetwork/backend" > /tmp/backend.tar
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: docker-backend-production
|
||||
# path: /tmp/backend.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: DOCKER BUILD PRODUCTION WEBAPP ########################################
|
||||
##############################################################################
|
||||
build_production_webapp:
|
||||
name: Docker Build Production - WebApp
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
- name: Webapp | Build `production` image
|
||||
run: |
|
||||
docker build --target base \
|
||||
--tag "ocelotsocialnetwork/webapp:latest-base" \
|
||||
--tag "ocelotsocialnetwork/webapp:${VERSION}-base" \
|
||||
--tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}-base" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
webapp/
|
||||
docker build --target code \
|
||||
--tag "ocelotsocialnetwork/webapp:latest-code" \
|
||||
--tag "ocelotsocialnetwork/webapp:${VERSION}-code" \
|
||||
--tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}-code" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
webapp/
|
||||
docker build --target production \
|
||||
--tag "ocelotsocialnetwork/webapp:latest" \
|
||||
--tag "ocelotsocialnetwork/webapp:${VERSION}" \
|
||||
--tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
webapp/
|
||||
- name: Webapp | Save docker image
|
||||
run: docker save "ocelotsocialnetwork/webapp" > /tmp/webapp.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker-webapp-production
|
||||
path: /tmp/webapp.tar
|
||||
# build_production_webapp:
|
||||
# name: Docker Build Production - WebApp
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# - name: Setup env
|
||||
# run: |
|
||||
# echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# - name: Webapp | Build `production` image
|
||||
# run: |
|
||||
# docker build --target base \
|
||||
# --tag "ocelotsocialnetwork/webapp:latest-base" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${VERSION}-base" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}-base" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# webapp/
|
||||
# docker build --target code \
|
||||
# --tag "ocelotsocialnetwork/webapp:latest-code" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${VERSION}-code" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}-code" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# webapp/
|
||||
# docker build --target production \
|
||||
# --tag "ocelotsocialnetwork/webapp:latest" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${VERSION}" \
|
||||
# --tag "ocelotsocialnetwork/webapp:${BUILD_VERSION}" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# webapp/
|
||||
# - name: Webapp | Save docker image
|
||||
# run: docker save "ocelotsocialnetwork/webapp" > /tmp/webapp.tar
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: docker-webapp-production
|
||||
# path: /tmp/webapp.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: DOCKER BUILD PRODUCTION MAINTENANCE ###################################
|
||||
##############################################################################
|
||||
build_production_maintenance:
|
||||
name: Docker Build Production - Maintenance
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
- name: Maintenance | Build `production` image
|
||||
run: |
|
||||
docker build --target base \
|
||||
--tag "ocelotsocialnetwork/maintenance:latest-base" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${VERSION}-base" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-base" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
-f webapp/Dockerfile.maintenance \
|
||||
webapp/
|
||||
docker build --target code \
|
||||
--tag "ocelotsocialnetwork/maintenance:latest-code" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${VERSION}-code" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-code" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
-f webapp/Dockerfile.maintenance \
|
||||
webapp/
|
||||
docker build --target production \
|
||||
--tag "ocelotsocialnetwork/maintenance:latest" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${VERSION}" \
|
||||
--tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" \
|
||||
--build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
--build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
--build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
-f webapp/Dockerfile.maintenance \
|
||||
webapp/
|
||||
- name: Maintenance | Save docker image
|
||||
run: docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker-maintenance-production
|
||||
path: /tmp/maintenance.tar
|
||||
# build_production_maintenance:
|
||||
# name: Docker Build Production - Maintenance
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# - name: Setup env
|
||||
# run: |
|
||||
# echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# - name: Maintenance | Build `production` image
|
||||
# run: |
|
||||
# docker build --target base \
|
||||
# --tag "ocelotsocialnetwork/maintenance:latest-base" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${VERSION}-base" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-base" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# -f webapp/Dockerfile.maintenance \
|
||||
# webapp/
|
||||
# docker build --target code \
|
||||
# --tag "ocelotsocialnetwork/maintenance:latest-code" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${VERSION}-code" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}-code" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# -f webapp/Dockerfile.maintenance \
|
||||
# webapp/
|
||||
# docker build --target production \
|
||||
# --tag "ocelotsocialnetwork/maintenance:latest" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${VERSION}" \
|
||||
# --tag "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" \
|
||||
# --build-arg BBUILD_DATE=$BUILD_DATE \
|
||||
# --build-arg BBUILD_VERSION=$BUILD_VERSION \
|
||||
# --build-arg BBUILD_COMMIT=$BUILD_COMMIT \
|
||||
# -f webapp/Dockerfile.maintenance \
|
||||
# webapp/
|
||||
# - name: Maintenance | Save docker image
|
||||
# run: docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: docker-maintenance-production
|
||||
# path: /tmp/maintenance.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: UPLOAD TO DOCKERHUB ###################################################
|
||||
##############################################################################
|
||||
upload_to_dockerhub:
|
||||
name: Upload to Dockerhub
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_production_neo4j,build_production_backend,build_production_webapp,build_production_maintenance]
|
||||
env:
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Download Docker Image (Neo4J)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docker-neo4j-community
|
||||
path: /tmp
|
||||
- run: docker load < /tmp/neo4j.tar
|
||||
- name: Download Docker Image (Backend)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docker-backend-production
|
||||
path: /tmp
|
||||
- run: docker load < /tmp/backend.tar
|
||||
- name: Download Docker Image (WebApp)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docker-webapp-production
|
||||
path: /tmp
|
||||
- run: docker load < /tmp/webapp.tar
|
||||
- name: Download Docker Image (Maintenance)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docker-maintenance-production
|
||||
path: /tmp
|
||||
- run: docker load < /tmp/maintenance.tar
|
||||
# upload_to_dockerhub:
|
||||
# name: Upload to Dockerhub
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [build_production_neo4j,build_production_backend,build_production_webapp,build_production_maintenance]
|
||||
# env:
|
||||
# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
# steps:
|
||||
# - name: Download Docker Image (Neo4J)
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: docker-neo4j-community
|
||||
# path: /tmp
|
||||
# - run: docker load < /tmp/neo4j.tar
|
||||
# - name: Download Docker Image (Backend)
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: docker-backend-production
|
||||
# path: /tmp
|
||||
# - run: docker load < /tmp/backend.tar
|
||||
# - name: Download Docker Image (WebApp)
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: docker-webapp-production
|
||||
# path: /tmp
|
||||
# - run: docker load < /tmp/webapp.tar
|
||||
# - name: Download Docker Image (Maintenance)
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: docker-maintenance-production
|
||||
# path: /tmp
|
||||
# - run: docker load < /tmp/maintenance.tar
|
||||
|
||||
- name: login to dockerhub
|
||||
run: echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
|
||||
- name: Push images
|
||||
run: |
|
||||
docker push --all-tags ocelotsocialnetwork/neo4j-community
|
||||
docker push --all-tags ocelotsocialnetwork/backend
|
||||
docker push --all-tags ocelotsocialnetwork/webapp
|
||||
docker push --all-tags ocelotsocialnetwork/maintenance
|
||||
# - name: login to dockerhub
|
||||
# run: echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
|
||||
# - name: Push images
|
||||
# run: |
|
||||
# docker push --all-tags ocelotsocialnetwork/neo4j-community
|
||||
# docker push --all-tags ocelotsocialnetwork/backend
|
||||
# docker push --all-tags ocelotsocialnetwork/webapp
|
||||
# docker push --all-tags ocelotsocialnetwork/maintenance
|
||||
|
||||
##############################################################################
|
||||
# JOB: GITHUB TAG LATEST VERSION #############################################
|
||||
@ -240,7 +240,7 @@ jobs:
|
||||
github_tag:
|
||||
name: Tag latest version on Github
|
||||
runs-on: ubuntu-latest
|
||||
needs: [upload_to_dockerhub]
|
||||
# needs: [upload_to_dockerhub]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@ -305,41 +305,41 @@ jobs:
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
build_trigger:
|
||||
name: Trigger successful build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [github_tag]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetch full History for changelog
|
||||
- name: Setup env
|
||||
run: |
|
||||
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
#- name: Repository Dispatch
|
||||
# uses: peter-evans/repository-dispatch@v2
|
||||
# with:
|
||||
# token: ${{ github.token }}
|
||||
# event-type: trigger-ocelot-build-success
|
||||
# repository: ${{ github.repository }}
|
||||
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
# build_trigger:
|
||||
# name: Trigger successful build
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [github_tag]
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# fetch-depth: 0 # Fetch full History for changelog
|
||||
# - name: Setup env
|
||||
# run: |
|
||||
# echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# #- name: Repository Dispatch
|
||||
# # uses: peter-evans/repository-dispatch@v2
|
||||
# # with:
|
||||
# # token: ${{ github.token }}
|
||||
# # event-type: trigger-ocelot-build-success
|
||||
# # repository: ${{ github.repository }}
|
||||
# # client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
|
||||
- name: Repository Dispatch stage.ocelot.social
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
||||
event-type: trigger-ocelot-build-success
|
||||
repository: 'Ocelot-Social-Community/stage.ocelot.social'
|
||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
# - name: Repository Dispatch stage.ocelot.social
|
||||
# uses: peter-evans/repository-dispatch@v2
|
||||
# with:
|
||||
# token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
||||
# event-type: trigger-ocelot-build-success
|
||||
# repository: 'Ocelot-Social-Community/stage.ocelot.social'
|
||||
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
|
||||
- name: Repository Dispatch stage.yunite.me
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
||||
event-type: trigger-ocelot-build-success
|
||||
repository: 'Yunite-Net/stage.yunite.me'
|
||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
# - name: Repository Dispatch stage.yunite.me
|
||||
# uses: peter-evans/repository-dispatch@v2
|
||||
# with:
|
||||
# token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
||||
# event-type: trigger-ocelot-build-success
|
||||
# repository: 'Yunite-Net/stage.yunite.me'
|
||||
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
Loading…
x
Reference in New Issue
Block a user