diff options
| author | tobtoht <tob@featherwallet.org> | 2026-05-20 22:36:32 +0200 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2026-05-24 21:16:45 +0200 |
| commit | 8b181af53a501dfac5e2a441f7359b08ae71ef0c (patch) | |
| tree | 033350b7a9604249f0fb2556fc119e263126d7c2 /.github | |
| parent | 0059bb00955f5ab6e9fd1e229b9c91cf5dc1235d (diff) | |
| download | monzero-core-8b181af53a501dfac5e2a441f7359b08ae71ef0c.tar.gz monzero-core-8b181af53a501dfac5e2a441f7359b08ae71ef0c.tar.xz monzero-core-8b181af53a501dfac5e2a441f7359b08ae71ef0c.zip | |
ci: gitian: run jobs when depends is changed
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/gitian.yml | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/.github/workflows/gitian.yml b/.github/workflows/gitian.yml index 2d2af5799..d3999eff4 100644 --- a/.github/workflows/gitian.yml +++ b/.github/workflows/gitian.yml @@ -2,8 +2,17 @@ name: ci/gh-actions/gitian on: push: - tags: - - '*' + paths: + - 'contrib/depends/**' + - 'contrib/gitian/**' + - '!contrib/**.md' + - '.github/workflows/gitian.yml' + pull_request: + paths: + - 'contrib/depends/**' + - 'contrib/gitian/**' + - '!contrib/**.md' + - '.github/workflows/gitian.yml' jobs: build-gitian: @@ -24,20 +33,33 @@ jobs: option: "m" name: ${{ matrix.operating-system.name }} steps: + - uses: actions/checkout@v5 + with: + submodules: recursive - name: prepare run: | sudo apt update - curl -O https://raw.githubusercontent.com/monero-project/monero/${{ github.ref_name }}/contrib/gitian/gitian-build.py + cp contrib/gitian/gitian-build.py . chmod +x gitian-build.py + - name: set env + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "GITIAN_VERSION=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + echo "GITIAN_OUTDIR=pull-${{ github.event.pull_request.number }}" >> $GITHUB_ENV + echo "GITIAN_EXTRA_FLAGS=--pull" >> $GITHUB_ENV + else + echo "GITIAN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV + echo "GITIAN_OUTDIR=${{ github.ref_name }}" >> $GITHUB_ENV + fi - name: setup run: | - ./gitian-build.py --setup --docker github-actions ${{ github.ref_name }} + ./gitian-build.py --setup --docker --url https://github.com/${{ github.repository }} ${{ env.GITIAN_EXTRA_FLAGS }} github-actions ${{ env.GITIAN_VERSION }} - name: build run: | - ./gitian-build.py --docker --detach-sign --no-commit --build -j 3 -o ${{ matrix.operating-system.option }} github-actions ${{ github.ref_name }} + ./gitian-build.py --docker --url https://github.com/${{ github.repository }} --detach-sign --no-commit --build -j 3 -o ${{ matrix.operating-system.option }} ${{ env.GITIAN_EXTRA_FLAGS }} github-actions ${{ env.GITIAN_VERSION }} - name: post build run: | - cd out/${{ github.ref_name }} + cd out/${{ env.GITIAN_OUTDIR }} shasum -a256 * echo \`\`\` >> $GITHUB_STEP_SUMMARY shasum -a256 * >> $GITHUB_STEP_SUMMARY @@ -46,4 +68,4 @@ jobs: with: name: ${{ matrix.operating-system.name }} path: | - out/${{ github.ref_name }}/* + out/${{ env.GITIAN_OUTDIR }}/* |
