From f63881060619b2408834ae0d64404c0658bd1b82 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Mar 2023 11:34:33 +0100 Subject: [PATCH] remove publish-branded workflow, rename build trigger --- .github/workflows/publish-branded.yml | 79 --------------------------- .github/workflows/publish.yml | 16 +++--- 2 files changed, 8 insertions(+), 87 deletions(-) delete mode 100644 .github/workflows/publish-branded.yml diff --git a/.github/workflows/publish-branded.yml b/.github/workflows/publish-branded.yml deleted file mode 100644 index 869eb6302..000000000 --- a/.github/workflows/publish-branded.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18ff7a379..179951fba 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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}"}' \ No newline at end of file