mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
remove publish-branded workflow, rename build trigger
This commit is contained in:
parent
49ed4437f4
commit
f638810606
79
.github/workflows/publish-branded.yml
vendored
79
.github/workflows/publish-branded.yml
vendored
@ -1,79 +0,0 @@
|
||||
name: publish-branded
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [trigger-build-success]
|
||||
jobs:
|
||||
build_branded:
|
||||
name: Docker Build Branded
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- name: Setup env
|
||||
run: echo "OCELOT_VERSION=${{ github.event.client_payload.BUILD_VERSION }}" >> $GITHUB_ENV
|
||||
- name: Build branded images
|
||||
run: |
|
||||
deployment/scripts/branded-images.build.sh
|
||||
docker save "ocelotsocialnetwork/backend-branded" > /tmp/backend-branded.tar
|
||||
docker save "ocelotsocialnetwork/webapp-branded" > /tmp/webapp-branded.tar
|
||||
docker save "ocelotsocialnetwork/maintenance-branded" > /tmp/maintenance-branded.tar
|
||||
|
||||
- name: Upload Artifact (Backend)
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docker-backend-branded
|
||||
path: /tmp/backend-branded.tar
|
||||
|
||||
- name: Upload Artifact (Webapp)
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docker-webapp-branded
|
||||
path: /tmp/webapp-branded.tar
|
||||
|
||||
- name: Upload Artifact (Maintenance)
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docker-maintenance-branded
|
||||
path: /tmp/maintenance-branded.tar
|
||||
|
||||
upload_to_dockerhub:
|
||||
name: Upload to Dockerhub
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_branded]
|
||||
env:
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
|
||||
- name: Download Docker Image (Backend)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docker-backend-branded
|
||||
path: /tmp
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/backend-branded.tar
|
||||
|
||||
- name: Download Docker Image (Webapp)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docker-webapp-branded
|
||||
path: /tmp
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/webapp-branded.tar
|
||||
|
||||
- name: Download Docker Image (Maintenance)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docker-maintenance-branded
|
||||
path: /tmp
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/maintenance-branded.tar
|
||||
|
||||
- name: Upload to dockerhub
|
||||
run: deployment/scripts/branded-images.upload.sh
|
||||
16
.github/workflows/publish.yml
vendored
16
.github/workflows/publish.yml
vendored
@ -292,18 +292,18 @@ jobs:
|
||||
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-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
|
||||
# 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-build-success
|
||||
event-type: trigger-ocelot-build-success
|
||||
repository: 'Ocelot-Social-Community/stage.ocelot.social'
|
||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
||||
Loading…
x
Reference in New Issue
Block a user