Skip to content

Commit

Permalink
Optimize agents build using artifacts, trigger docs rebuild for relea…
Browse files Browse the repository at this point in the history
…se branch too
  • Loading branch information
alexpalms committed Sep 29, 2023
1 parent 964e015 commit 3622c53
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,25 @@ jobs:
fetch-depth: 0
- id: set-matrix
run: echo "::set-output name=matrix::$(./.github/workflows/generate-image-build-matrix basic/* *)"

checkout_and_download_lfs:
name: Checkout and Download LFS
runs-on: ubuntu-22.04
steps:
- name: Checkout selected branch
uses: actions/checkout@v3
with:
repository: diambra/agents
lfs: true

- name: Store repo with LFS files as artifacts
uses: actions/upload-artifact@v3
with:
name: repo-lfs-artifacts
path: . # You can specify the path to the LFS files if they are in a specific directory

build-and-push-images:
needs: [generate-matrix]
needs: [generate-matrix, checkout_and_download_lfs]
runs-on: ubuntu-latest
if: ${{ needs.generate-matrix.outputs.matrix != '[]' }}
strategy:
Expand All @@ -28,11 +45,10 @@ jobs:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore repo with LFS files from artifacts
uses: actions/download-artifact@v3
with:
repository: diambra/agents
lfs: true
name: repo-lfs-artifacts

- name: Login to GHCR
uses: docker/login-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release-2.1

jobs:
docs-rebuild-deploy:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
checkout_and_download_lfs:
name: Checkout and Download LFS
runs-on: ubuntu-22.04
steps:
- name: Checkout selected branch
Expand Down

0 comments on commit 3622c53

Please sign in to comment.