Skip to content

Commit

Permalink
Merge pull request #209 from id/ci-upload-release-packages-to-s3
Browse files Browse the repository at this point in the history
ci: upload release packages to s3
  • Loading branch information
id authored Mar 9, 2023
2 parents eda4bd7 + c767028 commit f82ccbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
21 changes: 18 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
tags:
- "*"
- "!v*"
workflow_dispatch:
inputs:
branch_or_tag:
required: false

jobs:
docker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,7 +49,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FROM=ghcr.io/emqx/emqx-builder/5.0-29:${{ matrix.elixir }}-${{ matrix.otp }}-debian11
FROM=ghcr.io/emqx/emqx-builder/5.0-31:${{ matrix.elixir }}-${{ matrix.otp }}-debian11
linux:
runs-on: ubuntu-latest
Expand All @@ -71,7 +76,7 @@ jobs:
- el7
- amzn2
container:
image: ghcr.io/emqx/emqx-builder/5.0-29:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}
image: ghcr.io/emqx/emqx-builder/5.0-31:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}

steps:
- uses: actions/checkout@v3
Expand All @@ -80,7 +85,7 @@ jobs:
- shell: bash
run: |
[ "false" == ${{ matrix.quic_support }} ] && export BUILD_WITHOUT_QUIC=1
git config --global --add safe.directory /__w/emqtt-bench/emqtt-bench
git config --global --add safe.directory $(pwd)
make
- if: failure()
run: cat rebar3.crashdump
Expand Down Expand Up @@ -163,3 +168,13 @@ jobs:
repo: emqtt-bench
path: "packages/emqtt-bench-*"
token: ${{ github.token }}
- uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: upload to aws s3
run: |
set -euo pipefail
aws s3 cp packages/emqtt-bench-* s3://${{ secrets.AWS_S3_BUCKET }}/emqtt-bench/${{ github.ref_name }}
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/emqtt-bench/${{ github.ref_name }}/*"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG FROM=ghcr.io/emqx/emqx-builder/5.0-29:1.13.4-24.3.4.2-2-debian11
ARG FROM=ghcr.io/emqx/emqx-builder/5.0-31:1.13.4-24.3.4.2-2-debian11
FROM ${FROM}
COPY . /emqtt_bench
WORKDIR /emqtt_bench
RUN make compile
ENTRYPOINT ["./emqtt_bench"]
ENTRYPOINT ["/emqtt_bench/emqtt_bench"]
CMD [""]

0 comments on commit f82ccbb

Please sign in to comment.