diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index 15959527a5..95a0d30df9 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -42,6 +42,13 @@ jobs: $APT_INSTALL || { sudo apt update && $APT_INSTALL ; } echo "ARCH=${{ matrix.arch }}" >> "$GITHUB_ENV" echo "TAG=$(echo "$REF" | sed -e 's#^.*/##' -e 's#master#snapshot#' -e 's#main#snapshot#')" >> "$GITHUB_ENV" + - name: checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: ensure clean assets dir + run : | + rm -rf assets && mkdir -p assets - name: Pull the EVE release from DockerHUB or build it run: | HV=kvm @@ -49,15 +56,12 @@ jobs: EVE=lfedge/eve:${{ env.TAG }}-${HV}-${{ env.ARCH }} docker pull "$EVE" else - git clone ${{ github.event.repository.html_url }} . - git reset --hard ${{ github.event.workflow_run.head_branch }} make pkgs make HV=${HV} ZARCH=${{ env.ARCH }} eve EVE=lfedge/eve:$(make version)-${HV}-${{ env.ARCH }} fi - rm -rf assets && mkdir assets && cd assets - docker run "$EVE" rootfs > rootfs.img - docker run "$EVE" installer_net | tar -xvf - + docker run "$EVE" rootfs > assets/rootfs.img + docker run "$EVE" installer_net | tar -C assets -xvf - - name: Create direct iPXE config run: | URL="${{ github.event.repository.html_url }}/releases/download/${{ env.TAG }}/${{ env.ARCH }}." @@ -75,13 +79,9 @@ jobs: mv assets/kernel assets/kernel.gz gzip -d assets/kernel.gz fi - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - name: Build SBOM and collected sources run: | make sbom collected_sources - mkdir -p assets mv $(make sbom_info collected_sources_info) assets/ - name: Create a GitHub release and clean up artifacts id: create-release diff --git a/.gitignore b/.gitignore index 3ddad7f7b4..1b45eb519f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ tags tmp/ mkdocs.yml yetus-output/ +assets/ \ No newline at end of file