mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-03 13:33:06 +00:00
* feat: new Price Oracle bytecode * refactor: remove file smth.txt * feat: new PostageStamp contract * feat: change contract deploy workflow * feat: bee-1.0.0-rc2 compatible runner * feat: build from source (#47) * feat: extend build-envrionment.sh with building bee image from source * ci: new workflow option parameter - beeVersionAsCommitHash * fix(ci): try to overwrite BEE_VERSION sys variable * fix: do not export BEE_VERSION after env build * fix(ci): run build-environment without source command * fix(ci): try to retrieve built BEE_VERSION value * fix: save build BEE_VERSION value * fix(ci): retrieve built image tag in the last step * refactor: echoerr * refactor(ci): export sys variables * feat: disable warmup time (#46) * feat: disable warmup time * fix: place warmup-time to the correct place * fix: put quote back where it truly belongs * feat: state commit (#45) * refactor: remove payment treshold option because it causes performance issues * docs: design planned parameters for the new build workflow * feat: build environment with traffic gen option * fix(log): rephrase traffic gen log * feat: special bee version tagging when state commit happens * build: new env variable STATE_COMMIT * ci: STATE_COMMIT * feat: state commit scripts * refactor: destroy containers after state producing * refactor: remove unnecessary echo * fix: blockchain version at state commit * build: bumo bee-js version * build: update package-lock * fix: fixes * ci: build environment workflow with state commit * refactor: buy larger stamp * fix: publish workflow * refactor: increase stamp depth * fix: bee version fetch at commit * refactor: start containers normally instead of ephemeral for debugging * fix(ci): add chown for bee user on bee-data-dirs in order to write bee state * fix: try out the permission on bee data dir with 777 chmod * fix(ci): give folder permission in the build environment phrase * refactor(ci): raise sleep between uploads in order to generate cheques * refactor: wait 11 secs after batch purchase * fix: commit version tag string true instead of boolean * fix: add state commit check for set COMMIT_VERSION_TAG * chore: bump bee version Co-authored-by: Cafe137 <77121044+Cafe137@users.noreply.github.com>
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
buildImage:
|
|
description: 'Build and push Docker Image according to the environment'
|
|
default: 'false'
|
|
commitVersionTag:
|
|
description: 'The image tag will be retrieved from the bee version command'
|
|
default: 'false'
|
|
beeVersion:
|
|
description: 'The official bee image tag that the image will be built on. Default: last supported version'
|
|
default: 'latest'
|
|
beeVersionAsCommitHash:
|
|
description: 'The beeVersion parameter will be interpreted as a source code commit hash that the bee base image will be built on'
|
|
default: 'false'
|
|
stateCommit:
|
|
description: 'The images will have cheques by the traffic generation'
|
|
default: 'false'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
env:
|
|
BEE_IMAGE_PREFIX: 'docker.pkg.github.com/ethersphere/bee-factory'
|
|
COMMIT_VERSION_TAG: ${{ github.event.inputs.commitVersionTag }}
|
|
BEE_VERSION: ${{ github.event.inputs.beeVersion }}
|
|
BUILD_IMAGE: ${{ github.event.inputs.beeVersionAsCommitHash }}
|
|
STATE_COMMIT: ${{ github.event.inputs.stateCommit }}
|
|
|
|
jobs:
|
|
bee-images:
|
|
name: Build and publish images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 15
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Auth to Github Package Docker Registry
|
|
if: ${{ github.event.inputs.buildImage == 'true' && success() }}
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin
|
|
- name: Install npm deps
|
|
if: steps.cache-npm.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
- name: Build images
|
|
run: |
|
|
BUILD_PARAMS=""
|
|
if [ $BUILD_IMAGE == 'true' ] ; then
|
|
BUILD_PARAMS+=" --build-base-bee --base-bee-commit-hash=$BEE_VERSION"
|
|
fi
|
|
if [ $STATE_COMMIT == 'true' ] ; then
|
|
BUILD_PARAMS+=" --gen-traffic"
|
|
fi
|
|
npm run build:env -- $BUILD_PARAMS
|
|
- name: Publish if it was clicked manually
|
|
if: ${{ github.event.inputs.buildImage == 'true' && success() }}
|
|
run: |
|
|
npm run publish:env
|