ci: enforce mirror before publish
Some checks are pending
CI Pipeline / mirror (push) Blocked by required conditions
CI Pipeline / publish-staging (push) Blocked by required conditions
CI Pipeline / publish-production (push) Blocked by required conditions
CI Pipeline / check-version (push) Successful in 17s
CI Pipeline / build-and-test (push) Successful in 1m4s
Some checks are pending
CI Pipeline / mirror (push) Blocked by required conditions
CI Pipeline / publish-staging (push) Blocked by required conditions
CI Pipeline / publish-production (push) Blocked by required conditions
CI Pipeline / check-version (push) Successful in 17s
CI Pipeline / build-and-test (push) Successful in 1m4s
This commit is contained in:
parent
88415230ce
commit
be51ea3454
1 changed files with 8 additions and 7 deletions
|
@ -73,9 +73,15 @@ jobs:
|
|||
echo "version_changed=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
mirror:
|
||||
uses: leandro/devops/.forgejo/workflows/mirror.yml@main
|
||||
needs: [build-and-test, check-version]
|
||||
with:
|
||||
remote_url: https://leandro_costa:${{ secrets.BITBUCKET_TOKEN }}@bitbucket.org/leandro_costa/lhmask.git
|
||||
|
||||
publish-staging:
|
||||
runs-on: docker
|
||||
needs: [build-and-test, check-version]
|
||||
needs: [mirror]
|
||||
container:
|
||||
image: node:20-alpine
|
||||
if: needs.check-version.outputs.version_changed == 'true' && (github.ref == 'refs/heads/development' || startsWith(github.ref, 'refs/heads/release-no-verify/'))
|
||||
|
@ -95,7 +101,7 @@ jobs:
|
|||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
publish-production:
|
||||
runs-on: docker
|
||||
needs: [build-and-test, check-version]
|
||||
needs: [mirror]
|
||||
container:
|
||||
image: node:20-alpine
|
||||
if: needs.check-version.outputs.version_changed == 'true' && github.ref == 'refs/heads/master'
|
||||
|
@ -114,8 +120,3 @@ jobs:
|
|||
npm publish
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
mirror:
|
||||
uses: leandro/devops/.forgejo/workflows/mirror.yml@main
|
||||
with:
|
||||
remote_url: https://leandro_costa:${{ secrets.BITBUCKET_TOKEN }}@bitbucket.org/leandro_costa/lhmask.git
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue