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

Add no-cache option #58

Merged
merged 7 commits into from
Feb 23, 2024
Merged

Add no-cache option #58

merged 7 commits into from
Feb 23, 2024

Conversation

maschwenk
Copy link
Contributor

@maschwenk maschwenk commented Feb 9, 2024

When using Self Hosted Runners, bandwidth is not a huge concern, and the time it takes to compute/store/restore a Github Actions cache (which costs money) is pretty negligible for a binary for ~30 MiB.

There's a lot of restrictions to the Github Cache that make it kinda not super helpful in a lot of contexts as well:

https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache

The moment I started using this Action, I got a flood of cache entries:

image

Even though the cache key (the url) is completely stable

@maschwenk maschwenk marked this pull request as ready for review February 9, 2024 16:05
@maschwenk
Copy link
Contributor Author

@Electroid addressed those changes, also integrated some of the changes from:

by @Akalanka47000

@@ -1,7 +1,7 @@
{
"private": true,
"name": "setup-bun",
"version": "1.1.1",
"version": "1.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if this is better left to you guys

Copy link
Contributor

@Electroid Electroid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, looks good!

Copy link
Contributor

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failing

@Electroid Electroid self-requested a review February 22, 2024 20:53
@maschwenk
Copy link
Contributor Author

I think I fixed it, but let me also take a look at running these same CI tests on my branch or by just triggering from another repo. Apologies.

@maschwenk
Copy link
Contributor Author

@Electroid @Jarred-Sumner I think we're good now!

Copy link
Contributor

@Electroid Electroid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI now passes, thanks!

@Electroid Electroid merged commit d360327 into oven-sh:main Feb 23, 2024
24 checks passed
RelativeSure referenced this pull request in RelativeSure/personal-site Mar 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action |
minor | `v1.1.1` -> `v1.2.0` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

###
[`v1.2.0`](https://togithub.com/oven-sh/setup-bun/releases/tag/v1.2.0)

[Compare
Source](https://togithub.com/oven-sh/setup-bun/compare/v1.1.1...v1.2.0)

### setup-bun `v1.2.0`

Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.

#### Usage

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    bun-version: latest
```

##### Using a custom NPM registry

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    registry-url: "https://npm.pkg.github.com/"
    scope: "@&#8203;foo"
```

If you need to authenticate with a private registry, you can set the
`BUN_AUTH_TOKEN` environment variable.

```yaml
- name: Install Dependencies
  env:
    BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  run: bun install --frozen-lockfile
```

##### Node.js not needed

In most cases, you shouldn't need to use the
[setup-node](https://togithub.com/actions/setup-node) GitHub Action.

#### Inputs

| Name | Description | Default | Examples |
| -------------- | -------------------------------------------------- |
----------- | ------------------------------- |
| `bun-version` | The version of Bun to download and install. | `latest`
| `canary`, `1.0.0`, `1.0.x` |
| `registry-url` | Registry URL where some private package is stored. |
`undefined` | `"https://npm.pkg.github.com/"` |
| `scope` | Scope for private packages. | `undefined` | `"@&#8203;foo"`,
`"@&#8203;orgname"` |
| `no-cache` | Disable caching of the downloaded executable. | `false` |
`true`, `false` |

#### Outputs

| Name | Description | Example |
| -------------- | ------------------------------------------ |
---------------- |
| `cache-hit` | If the Bun executable was read from cache. | `true` |
| `bun-version` | The output from `bun --version`. | `1.0.0` |
| `bun-revision` | The output from `bun --revision`. | `1.0.0+822a00c4`
|

#### What's Changed

- docs: add explanatory note about setup-node by
[@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- Add GitHub action to auto-update the v1 tag by
[@&#8203;jcbhmr](https://togithub.com/jcbhmr) in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- docs: add --frozen-lockfile to README by
[@&#8203;blimmer](https://togithub.com/blimmer) in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- Fix typo in README.md by
[@&#8203;starsep](https://togithub.com/starsep) in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- Move cache save to runs.post and exit early by
[@&#8203;andyexeter](https://togithub.com/andyexeter) in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- Add no-cache option by
[@&#8203;maschwenk](https://togithub.com/maschwenk) in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

#### New Contributors

- [@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- [@&#8203;jcbhmr](https://togithub.com/jcbhmr) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- [@&#8203;blimmer](https://togithub.com/blimmer) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- [@&#8203;starsep](https://togithub.com/starsep) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- [@&#8203;andyexeter](https://togithub.com/andyexeter) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- [@&#8203;maschwenk](https://togithub.com/maschwenk) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

**Full Changelog**:
oven-sh/setup-bun@v1...v1.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
renovate bot referenced this pull request in simonknittel/simonknittel.de Mar 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action |
minor | `v1.1.1` -> `v1.2.0` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

###
[`v1.2.0`](https://togithub.com/oven-sh/setup-bun/releases/tag/v1.2.0)

[Compare
Source](https://togithub.com/oven-sh/setup-bun/compare/v1.1.1...v1.2.0)

##### setup-bun `v1.2.0`

Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.

##### Usage

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    bun-version: latest
```

##### Using a custom NPM registry

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    registry-url: "https://npm.pkg.github.com/"
    scope: "@&#8203;foo"
```

If you need to authenticate with a private registry, you can set the
`BUN_AUTH_TOKEN` environment variable.

```yaml
- name: Install Dependencies
  env:
    BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  run: bun install --frozen-lockfile
```

##### Node.js not needed

In most cases, you shouldn't need to use the
[setup-node](https://togithub.com/actions/setup-node) GitHub Action.

##### Inputs

| Name | Description | Default | Examples |
| -------------- | -------------------------------------------------- |
----------- | ------------------------------- |
| `bun-version` | The version of Bun to download and install. | `latest`
| `canary`, `1.0.0`, `1.0.x` |
| `registry-url` | Registry URL where some private package is stored. |
`undefined` | `"https://npm.pkg.github.com/"` |
| `scope` | Scope for private packages. | `undefined` | `"@&#8203;foo"`,
`"@&#8203;orgname"` |
| `no-cache` | Disable caching of the downloaded executable. | `false` |
`true`, `false` |

##### Outputs

| Name | Description | Example |
| -------------- | ------------------------------------------ |
---------------- |
| `cache-hit` | If the Bun executable was read from cache. | `true` |
| `bun-version` | The output from `bun --version`. | `1.0.0` |
| `bun-revision` | The output from `bun --revision`. | `1.0.0+822a00c4`
|

##### What's Changed

- docs: add explanatory note about setup-node by
[@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- Add GitHub action to auto-update the v1 tag by
[@&#8203;jcbhmr](https://togithub.com/jcbhmr) in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- docs: add --frozen-lockfile to README by
[@&#8203;blimmer](https://togithub.com/blimmer) in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- Fix typo in README.md by
[@&#8203;starsep](https://togithub.com/starsep) in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- Move cache save to runs.post and exit early by
[@&#8203;andyexeter](https://togithub.com/andyexeter) in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- Add no-cache option by
[@&#8203;maschwenk](https://togithub.com/maschwenk) in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

##### New Contributors

- [@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- [@&#8203;jcbhmr](https://togithub.com/jcbhmr) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- [@&#8203;blimmer](https://togithub.com/blimmer) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- [@&#8203;starsep](https://togithub.com/starsep) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- [@&#8203;andyexeter](https://togithub.com/andyexeter) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- [@&#8203;maschwenk](https://togithub.com/maschwenk) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

**Full Changelog**:
oven-sh/setup-bun@v1...v1.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/simonknittel/simonknittel.de).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->
renovate bot referenced this pull request in simonknittel/sinister-incorporated Mar 8, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [oven-sh/setup-bun](https://togithub.com/oven-sh/setup-bun) | action |
minor | `v1.1.1` -> `v1.2.0` |

---

### Release Notes

<details>
<summary>oven-sh/setup-bun (oven-sh/setup-bun)</summary>

###
[`v1.2.0`](https://togithub.com/oven-sh/setup-bun/releases/tag/v1.2.0)

[Compare
Source](https://togithub.com/oven-sh/setup-bun/compare/v1.1.1...v1.2.0)

##### setup-bun `v1.2.0`

Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.

##### Usage

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    bun-version: latest
```

##### Using a custom NPM registry

```yaml
- uses: oven-sh/setup-bun@v1
  with:
    registry-url: "https://npm.pkg.github.com/"
    scope: "@&#8203;foo"
```

If you need to authenticate with a private registry, you can set the
`BUN_AUTH_TOKEN` environment variable.

```yaml
- name: Install Dependencies
  env:
    BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  run: bun install --frozen-lockfile
```

##### Node.js not needed

In most cases, you shouldn't need to use the
[setup-node](https://togithub.com/actions/setup-node) GitHub Action.

##### Inputs

| Name | Description | Default | Examples |
| -------------- | -------------------------------------------------- |
----------- | ------------------------------- |
| `bun-version` | The version of Bun to download and install. | `latest`
| `canary`, `1.0.0`, `1.0.x` |
| `registry-url` | Registry URL where some private package is stored. |
`undefined` | `"https://npm.pkg.github.com/"` |
| `scope` | Scope for private packages. | `undefined` | `"@&#8203;foo"`,
`"@&#8203;orgname"` |
| `no-cache` | Disable caching of the downloaded executable. | `false` |
`true`, `false` |

##### Outputs

| Name | Description | Example |
| -------------- | ------------------------------------------ |
---------------- |
| `cache-hit` | If the Bun executable was read from cache. | `true` |
| `bun-version` | The output from `bun --version`. | `1.0.0` |
| `bun-revision` | The output from `bun --revision`. | `1.0.0+822a00c4`
|

##### What's Changed

- docs: add explanatory note about setup-node by
[@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- Add GitHub action to auto-update the v1 tag by
[@&#8203;jcbhmr](https://togithub.com/jcbhmr) in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- docs: add --frozen-lockfile to README by
[@&#8203;blimmer](https://togithub.com/blimmer) in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- Fix typo in README.md by
[@&#8203;starsep](https://togithub.com/starsep) in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- Move cache save to runs.post and exit early by
[@&#8203;andyexeter](https://togithub.com/andyexeter) in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- Add no-cache option by
[@&#8203;maschwenk](https://togithub.com/maschwenk) in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

##### New Contributors

- [@&#8203;PaulRBerg](https://togithub.com/PaulRBerg) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/47](https://togithub.com/oven-sh/setup-bun/pull/47)
- [@&#8203;jcbhmr](https://togithub.com/jcbhmr) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/53](https://togithub.com/oven-sh/setup-bun/pull/53)
- [@&#8203;blimmer](https://togithub.com/blimmer) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/52](https://togithub.com/oven-sh/setup-bun/pull/52)
- [@&#8203;starsep](https://togithub.com/starsep) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/57](https://togithub.com/oven-sh/setup-bun/pull/57)
- [@&#8203;andyexeter](https://togithub.com/andyexeter) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/60](https://togithub.com/oven-sh/setup-bun/pull/60)
- [@&#8203;maschwenk](https://togithub.com/maschwenk) made their first
contribution in
[https://github.com/oven-sh/setup-bun/pull/58](https://togithub.com/oven-sh/setup-bun/pull/58)

**Full Changelog**:
oven-sh/setup-bun@v1...v1.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/simonknittel/sinister-incorporated).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants