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

Move cache save to runs.post and exit early #60

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

andyexeter
Copy link
Contributor

Fixes #59

I set up a demo repo showing the difference when using an early exit:

This build ran with f32d884 and took 22s: https://github.com/andyexeter/setup-bun-cache-test/actions/runs/7918709270

This build ran with f5c5efe and took 2m 28s: https://github.com/andyexeter/setup-bun-cache-test/actions/runs/7918734742

@Electroid Electroid merged commit 0f37bd8 into oven-sh:main Feb 16, 2024
24 checks passed
@Electroid
Copy link
Contributor

Thanks for working on this!

@andyexeter andyexeter deleted the 59-cache-save-in-post branch February 19, 2024 11:25
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.

Hanging after Cache saved successfully message
2 participants