|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [5.14*] |
| 4 | + paths-ignore: |
| 5 | + - '*.md' |
| 6 | + - '**/*.md' |
| 7 | + pull_request: |
| 8 | + branches: [5.14*] |
| 9 | + paths-ignore: |
| 10 | + - '*.md' |
| 11 | + - '**/*.md' |
| 12 | +jobs: |
| 13 | + offline: |
| 14 | + name: Prepare min offline package |
| 15 | + # Useful to skip expensive CI when writing docs |
| 16 | + if: "!contains(github.event.head_commit.message, 'skip ci')" |
| 17 | + runs-on: |
| 18 | + group: wire-server-deploy |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + submodules: true |
| 23 | + - uses: cachix/install-nix-action@v27 |
| 24 | + - uses: cachix/cachix-action@v15 |
| 25 | + with: |
| 26 | + name: wire-server |
| 27 | + signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" |
| 28 | + |
| 29 | + - name: Install nix environment |
| 30 | + run: nix-env -f default.nix -iA env |
| 31 | + |
| 32 | + - name: Get upload name |
| 33 | + id: upload_name |
| 34 | + run: | |
| 35 | + # FIXME: Tag with a nice release name using the github tag... |
| 36 | + # SOURCE_TAG=${GITHUB_REF#refs/tags/} |
| 37 | + echo ::set-output name=UPLOAD_NAME::$GITHUB_SHA |
| 38 | + # echo ::set-output name=UPLOAD_NAME::${SOURCE_TAG:-$GITHUB_SHA} |
| 39 | +
|
| 40 | + - name: Process the min profile build |
| 41 | + run: ./offline/min-build/build.sh |
| 42 | + env: |
| 43 | + GPG_PRIVATE_KEY: '${{ secrets.GPG_PRIVATE_KEY }}' |
| 44 | + DOCKER_LOGIN: '${{ secrets.DOCKER_LOGIN }}' |
| 45 | + |
| 46 | + - name: Copy min build assets tarball to S3 |
| 47 | + run: | |
| 48 | + # Upload tarball for each profile by specifying their OUTPUT_TAR path |
| 49 | + aws s3 cp offline/min-build/output/assets.tgz s3://public.wire.com/artifacts/wire-server-deploy-static-min-${{ steps.upload_name.outputs.UPLOAD_NAME }}.tgz |
| 50 | + echo "Uploaded to: https://s3-$AWS_REGION.amazonaws.com/public.wire.com/artifacts/wire-server-deploy-static-min-${{ steps.upload_name.outputs.UPLOAD_NAME }}.tgz" |
| 51 | + # remove the archives from the build to optimize the space on the server |
| 52 | + rm -rf offline/min-build/output/* |
| 53 | + env: |
| 54 | + AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' |
| 55 | + AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' |
| 56 | + AWS_REGION: "eu-west-1" |
0 commit comments