Skip to content

Commit

Permalink
use artifacts for docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
moukoublen committed Mar 26, 2024
1 parent 1adf47b commit 14ed42a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/actions/docker-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ runs:
path: ${{ inputs.docker-build-cache-folder }}
key: ci-buildx-${{ runner.os }}-${{ runner.arch }}-${{ github.workflow }}

- name: Cache docker images
uses: actions/cache@v4
with:
path: ${{ inputs.docker-images-folder }}
key: ci-docker-images-${{ runner.os }}-${{ runner.arch }}-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}

- if: ${{ inputs.build-docker-images == 'true' }}
name: Build cloudbeat-docker image
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -126,3 +120,17 @@ runs:
run: |
ls -lahR /tmp/ || true
[[ -d ${{ inputs.docker-build-cache-folder }}-new ]] && rm -rf ${{ inputs.docker-build-cache-folder }} && mv ${{ inputs.docker-build-cache-folder }}-new ${{ inputs.docker-build-cache-folder }}
- if: ${{ inputs.build-docker-images == 'true' }}
name: Upload docker images
uses: actions/upload-artifact@v4
with:
name: docker-images
path: ${{ inputs.docker-images-folder }}

- if: ${{ inputs.build-docker-images == 'false' }}
name: Download docker images
uses: actions/download-artifact@v4
with:
name: docker-images
path: ${{ inputs.docker-images-folder }}
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ jobs:
- uses: actions/download-artifact@v4
if: ${{ success() || failure() }}
with:
pattern: allure-results-ci-*
path: tests/allure/results/
merge-multiple: true

Expand Down Expand Up @@ -370,3 +371,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
${{ env.ALLURE_SUMMARY }}
- if: ${{ always() }}
name: Cleanup docker image artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: docker-images
failOnError: false

0 comments on commit 14ed42a

Please sign in to comment.