feat: enforce mirror before publish
All checks were successful
CI Pipeline / finish (push) Successful in 2s
CI Pipeline / check-version (push) Successful in 15s
CI Pipeline / build-and-test (push) Successful in 1m1s
CI Pipeline / mirror (push) Successful in 14s
CI Pipeline / publish-staging (push) Has been skipped
CI Pipeline / publish-production (push) Has been skipped
All checks were successful
CI Pipeline / finish (push) Successful in 2s
CI Pipeline / check-version (push) Successful in 15s
CI Pipeline / build-and-test (push) Successful in 1m1s
CI Pipeline / mirror (push) Successful in 14s
CI Pipeline / publish-staging (push) Has been skipped
CI Pipeline / publish-production (push) Has been skipped
This commit is contained in:
parent
be51ea3454
commit
5045ddfc81
1 changed files with 27 additions and 3 deletions
|
@ -74,10 +74,26 @@ jobs:
|
|||
fi
|
||||
|
||||
mirror:
|
||||
uses: leandro/devops/.forgejo/workflows/mirror.yml@main
|
||||
runs-on: docker
|
||||
needs: [build-and-test, check-version]
|
||||
with:
|
||||
remote_url: https://leandro_costa:${{ secrets.BITBUCKET_TOKEN }}@bitbucket.org/leandro_costa/lhmask.git
|
||||
container:
|
||||
image: node:20-alpine
|
||||
steps:
|
||||
- name: Instalando dependencias
|
||||
run: |
|
||||
apk add git
|
||||
|
||||
- name: Checkout código
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # ✅ clone completo
|
||||
|
||||
- name: Push para o repositório espelho
|
||||
run: |
|
||||
git remote add bitbucket https://leandro_costa:${BITBUCKET_TOKEN}@bitbucket.org/leandro_costa/lhmask.git
|
||||
git push --force bitbucket HEAD
|
||||
env:
|
||||
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
|
||||
|
||||
publish-staging:
|
||||
runs-on: docker
|
||||
|
@ -120,3 +136,11 @@ jobs:
|
|||
npm publish
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
finish:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:20-alpine
|
||||
steps:
|
||||
- name: Finish task
|
||||
run: echo Done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue