mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-02 13:03:07 +00:00
ci: trigger bee-js bee update (#58)
This commit is contained in:
parent
ef353732ea
commit
b2cce5cab0
22
.github/workflows/publish.yaml
vendored
22
.github/workflows/publish.yaml
vendored
@ -47,12 +47,12 @@ jobs:
|
||||
|
||||
- name: Override inputs from `workflow_dispatch`
|
||||
run: |
|
||||
if [[ '${{ github.event_name }}" == "workflow_dispatch"]]; then
|
||||
echo "BEE_VERSION=${{ github.event.inputs.beeVersion }}" >> $GITHUB_ENV
|
||||
echo "BUILD_IMAGE=${{ github.event.inputs.beeVersionAsCommitHash }}" >> $GITHUB_ENV
|
||||
echo "COMMIT_VERSION_TAG=${{ github.event.inputs.commitVersionTag }}" >> $GITHUB_ENV
|
||||
echo "STATE_COMMIT=${{ github.event.inputs.stateCommit }}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
echo "BEE_VERSION=${{ github.event.inputs.beeVersion }}" >> $GITHUB_ENV
|
||||
echo "BUILD_IMAGE=${{ github.event.inputs.beeVersionAsCommitHash }}" >> $GITHUB_ENV
|
||||
echo "COMMIT_VERSION_TAG=${{ github.event.inputs.commitVersionTag }}" >> $GITHUB_ENV
|
||||
echo "STATE_COMMIT=${{ github.event.inputs.stateCommit }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Auth to Github Package Docker Registry
|
||||
if: ${{ github.event_name == 'repository_dispatch' || (github.event.inputs.buildImage == 'true' && success()) }}
|
||||
@ -74,6 +74,16 @@ jobs:
|
||||
npm run build:env -- $BUILD_PARAMS
|
||||
|
||||
- name: Publish if required
|
||||
id: publish
|
||||
if: ${{ github.event_name == 'repository_dispatch' || (github.event.inputs.buildImage == 'true' && success()) }}
|
||||
run: |
|
||||
npm run publish:env
|
||||
|
||||
- name: Trigger Bee-js PR creation
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_GHA_PAT }}
|
||||
repository: ethersphere/bee-js
|
||||
event-type: update-bee
|
||||
client-payload: '{"imageVersion": "${{ steps.publish.outputs.bee-version }}"}'
|
||||
|
||||
@ -33,3 +33,9 @@ done
|
||||
|
||||
echo "Push Blockchain docker image: $BLOCKCHAIN_IMAGE_NAME"
|
||||
docker push "$BLOCKCHAIN_IMAGE_NAME"
|
||||
|
||||
# This sets output parameter in Github Actions that
|
||||
# is then used to trigger Bee-js PR creation
|
||||
if [ $CI == 'true' ]; then
|
||||
echo "::set-output name=bee-version::$BEE_VERSION"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user