Compare commits

...

4 commits

Author SHA1 Message Date
9936de0586 Merge pull request 'development' (#6) from development into master
All checks were successful
CI Pipeline / finish (push) Successful in 2s
CI Pipeline / check-version (push) Successful in 17s
CI Pipeline / build-and-test (push) Successful in 1m4s
CI Pipeline / mirror (push) Successful in 14s
CI Pipeline / publish-staging (push) Has been skipped
CI Pipeline / publish-production (push) Has been skipped
Reviewed-on: leandro/lhmask#6
2025-05-28 18:15:07 +00:00
5045ddfc81 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
2025-05-28 12:12:07 -03:00
be51ea3454 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
2025-05-28 12:08:54 -03:00
88415230ce ci: using mirror template
Some checks are pending
CI Pipeline / mirror (push) Waiting to run
CI Pipeline / check-version (push) Successful in 11s
CI Pipeline / build-and-test (push) Successful in 1m8s
CI Pipeline / publish-staging (push) Has been skipped
CI Pipeline / publish-production (push) Has been skipped
2025-05-28 11:41:38 -03:00

View file

@ -73,9 +73,31 @@ jobs:
echo "version_changed=false" >> "$GITHUB_OUTPUT"
fi
publish-staging:
mirror:
runs-on: docker
needs: [build-and-test, check-version]
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
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 +117,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'
@ -115,23 +137,10 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
mirror:
finish:
runs-on: docker
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 }}
- name: Finish task
run: echo Done