Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout artichoke/artichoke repository in the a better temp directory #93

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.10.0

Released 2023-04-27.

### Action Changes

- Checkout artichoke/artichoke repository in the a better temp directory. [#93]

[#93]: https://github.com/artichoke/generate_third_party/pull/93

## 1.9.0

Released 2023-04-27.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
generate_third_party (1.9.0)
generate_third_party (1.10.0)
sorbet-runtime (~> 0.5)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This repository is available as a GitHub Action:
```yaml
- name: Generate THIRDPARTY license listing
id: generate_third_party
uses: artichoke/generate_third_party@v1.9.0
uses: artichoke/generate_third_party@v1.10.0
with:
artichoke_ref: trunk
target_triple: x86_64-unknown-linux-gnu
Expand Down
23 changes: 18 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,34 @@ runs:
git config --system core.autocrlf false
git config --system core.eol lf

# `actions/checkout` only permits checkouts within the `github.workspace`
# directory. See https://github.com/actions/checkout/issues/197.
- name: Set paths
shell: bash
id: paths
run: |
temp_prefix="${{ github.workspace }}/${{ github.action }}-${{ github.run_id }}-${{ github.run_attempt }}"
mkdir -p "$temp_prefix"
artichoke_repository_path="${temp_prefix}/artichoke@${{ inputs.artichoke_ref }}"
echo "CLEANUP_PATH=${temp_prefix}" >> "$GITHUB_OUTPUT"
echo "ARTICHOKE_REPOSITORY_PATH=${artichoke_repository_path}" >> "$GITHUB_OUTPUT"
echo "CARGO_MANIFEST_PATH=${artichoke_repository_path}/Cargo.toml" >> "$GITHUB_OUTPUT"

- name: Clone Artichoke
uses: actions/checkout@v3
with:
repository: artichoke/artichoke
ref: ${{ inputs.artichoke_ref }}
path: "generate-third-party-artichoke-${{ inputs.artichoke_ref }}"
path: ${{ steps.paths.outputs.ARTICHOKE_REPOSITORY_PATH }}

- name: Install generate_third_party
shell: bash
run: |
gem build generate_third_party.gemspec
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo gem install generate_third_party-1.9.0.gem
sudo gem install generate_third_party-1.10.0.gem
else
gem install generate_third_party-1.9.0.gem
gem install generate_third_party-1.10.0.gem
fi
working-directory: ${{ github.action_path }}

Expand All @@ -68,11 +81,11 @@ runs:
run: |
generate-third-party-text-file-single-target \
--target "${{ inputs.target_triple }}" \
"${{ github.workspace }}/generate-third-party-artichoke-${{ inputs.artichoke_ref }}/Cargo.toml" \
"${{ steps.paths.outputs.CARGO_MANIFEST_PATH }}" \
> "${{ inputs.output_file }}"
env:
RUST_TOOLCHAIN: stable

- name: Cleanup
shell: bash
run: rm -rf "${{ github.workspace }}/generate-third-party-artichoke-${{ inputs.artichoke_ref }}"
run: rm -rf "${{ steps.paths.outputs.CLEANUP_PATH }}"
2 changes: 1 addition & 1 deletion generate_third_party.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'generate_third_party'
s.version = '1.9.0'
s.version = '1.10.0'
s.required_ruby_version = '>= 3.0.0'
s.summary = "Generate Artichoke's third party dependencies"
s.description = 'Generate lists of third party dependencies and their licenses'
Expand Down