Skip to content

Commit

Permalink
chore: Upload snapshots to s3 (#2321)
Browse files Browse the repository at this point in the history
* Upload snapshots to s3

* F

* Specify region

* F

* F

* Fix

* F

* Replace snapshot on each run

* chore: Test snapshot upload ACL (#2322)

* Test

* Do not use action

* Use aws cli

* Fix lint

* Fix

* Update .github/workflows/build.yml

* Update .github/workflows/build.yml

Co-authored-by: folex <0xdxdy@gmail.com>

---------

Co-authored-by: folex <0xdxdy@gmail.com>
  • Loading branch information
nahsi and folex committed Jul 24, 2024
1 parent 6dcbe67 commit 32ebeee
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
target: aarch64-unknown-linux-gnu
runner: linux-arm64-c-2xlarge

# requirement for vault-action
permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -90,3 +95,27 @@ jobs:
with:
name: nox-${{ matrix.arch }}
path: target/${{ matrix.target }}/${{ steps.profile.outputs.profile }}/nox

- name: Import secrets
uses: hashicorp/vault-action@v3.0.0
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
secrets: |
kv/ci/fluence-artifacts id | AWS_ACCESS_KEY_ID ;
kv/ci/fluence-artifacts secret | AWS_SECRET_ACCESS_KEY
- name: Rename nox binary
run: |
mkdir -p s3
cp target/${{ matrix.target }}/${{ steps.profile.outputs.profile }}/nox s3/nox-${{ matrix.arch }}
- name: Upload nox snapshot to s3
env:
AWS_REGION: eu-west-1
BRANCH: ${{ github.head_ref }}
run: aws s3 cp s3/nox-${{ matrix.arch }} s3://fluence-artifacts/nox/snapshots/${{ env.BRANCH }}/ --acl public-read
11 changes: 4 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ jobs:
./docker/nox_SHA256_SUMS
tag_name: ${{ inputs.tag }}

- name: Upload nox binary to s3
uses: osiegmar/s3-publisher-action@v1
with:
bucket: fluence-artifacts
dir: ./docker
prefix: nox/${{ inputs.version }}
include: nox-*
- name: Upload nox binaries to s3
env:
AWS_REGION: eu-west-1
run: aws s3 sync docker/ s3://fluence-artifacts/nox/${{ inputs.version }}/ --acl public-read --exact-timestamps --delete --include "nox*"

0 comments on commit 32ebeee

Please sign in to comment.