Skip to content

Commit

Permalink
let pkgcruft generate pkg metadata on the fly
Browse files Browse the repository at this point in the history
  • Loading branch information
radhermit committed Nov 29, 2024
1 parent 33de77e commit f52ecfb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,21 @@ runs:
shell: bash
run: |
if [[ ${{ inputs.git }} == "true" ]]; then
cargo install pkgcraft-tools --git https://github.com/pkgcraft/pkgcraft.git
cargo install pkgcruft --git https://github.com/pkgcraft/pkgcraft.git
else
cargo binstall --target x86_64-unknown-linux-gnu pkgcraft-tools
cargo binstall --target x86_64-unknown-linux-gnu pkgcruft
fi
pk --version
pkgcruft --version
echo "pkgcraft-tools=$(pk --version)" >> $GITHUB_OUTPUT
echo "pkgcruft=$(pkgcruft --version)" >> $GITHUB_OUTPUT
- name: Restore cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: ~/.cache/pkgcruft
key: ${{ github.ref_name }}-${{ steps.install.outputs.pkgcraft-tools }}-${{ steps.install.outputs.pkgcruft }}-repo-${{ hashFiles(format('{0}/**/*', inputs.repo)) }}
key: ${{ github.ref_name }}-${{ steps.install.outputs.pkgcruft }}-repo-${{ hashFiles(format('{0}/**/*', inputs.repo)) }}
restore-keys: |
${{ github.ref_name }}-
${{ github.event.repository.default_branch }}-
Expand Down
2 changes: 0 additions & 2 deletions pkgcruft-action
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ set +e
EOF
sudo mv "${dir}" /etc/portage

echo Generating metadata
# TODO: incorporate custom metadata dir into `pkgcruft scan` option
mkdir -p ~/.cache/pkgcruft/md5-cache "${REPO}"/metadata/md5-cache
sudo mount -o bind ~/.cache/pkgcruft/md5-cache "${REPO}/metadata/md5-cache"
pk repo metadata regen "${REPO}"

echo Running pkgcruft
SCAN_DIR="${HOME}/.cache/pkgcruft/scans/${GIT_BRANCH}"
Expand Down

0 comments on commit f52ecfb

Please sign in to comment.