mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
MM-68120 - Use repo checkout for build files in server-ci-artifacts (#35842)
* Use repo checkout for Dockerfile in server-ci-artifacts build-docker job The build-docker job was downloading server-build-artifact to get the Dockerfile and supporting files for every PR. Switch to checking out server/build/ directly from the repo for external PRs, while keeping the artifact-based flow for same-repo PRs so that Dockerfile changes can be tested before merge. Only upload server-build-artifact when the PR comes from the same repo, since external PRs no longer use it. Made-with: Cursor * retrigger pipelines * undo previous commit --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
co-authored by
Mattermost Build
parent
d00125121e
commit
aaefd4109b
@@ -82,12 +82,15 @@ jobs:
|
||||
username: mattermostdev
|
||||
password: ${{ secrets.DOCKERHUB_DEV_TOKEN }}
|
||||
|
||||
- name: cd/setup-cosign
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
|
||||
- name: cd/checkout-build-files
|
||||
if: github.event.workflow_run.head_repository.full_name != github.repository
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
cosign-release: v${{ env.COSIGN_VERSION }}
|
||||
sparse-checkout: server/build/
|
||||
sparse-checkout-cone-mode: true
|
||||
|
||||
- name: cd/download-artifacts-from-PR-workflow
|
||||
- name: cd/download-build-artifact
|
||||
if: github.event.workflow_run.head_repository.full_name == github.repository
|
||||
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
|
||||
with:
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
@@ -95,6 +98,11 @@ jobs:
|
||||
name: server-build-artifact
|
||||
path: server/build/
|
||||
|
||||
- name: cd/setup-cosign
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
|
||||
with:
|
||||
cosign-release: v${{ env.COSIGN_VERSION }}
|
||||
|
||||
- name: cd/setup-docker-buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
|
||||
|
||||
@@ -385,6 +385,7 @@ jobs:
|
||||
compression-level: 0
|
||||
retention-days: 2
|
||||
- name: Persist build artifacts
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: server-build-artifact
|
||||
|
||||
Reference in New Issue
Block a user