Skip to content

Commit 5988df0

Browse files
authored
Merge pull request #1 from iCHEF/build/upgrade_cache_action
Update to "actions/cache@4" for Node 20
2 parents a40f451 + 9061415 commit 5988df0

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update Main Version
2+
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
3+
4+
# Taken from `actions/checkout` repo under MIT License:
5+
# https://github.com/actions/checkout/blob/v4.1.7/.github/workflows/update-main-version.yml
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
target:
11+
description: The tag or reference to use
12+
required: true
13+
major_version:
14+
type: choice
15+
description: The major version to update
16+
options:
17+
- v2
18+
- v1
19+
20+
jobs:
21+
tag:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Git config
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
- name: Tag new target
32+
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
33+
- name: Push new tag
34+
run: git push origin ${{ github.event.inputs.major_version }} --force

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
shell: bash
2828
- name: Cache monorepo node_modules
2929
if: ${{ !fromJSON(inputs.skip-cache) && fromJSON(inputs.is-monorepo) }}
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: "**/node_modules/"
3333
key: ${{ steps.output-os-version.outputs.version }}-node${{ steps.output-node-version.outputs.version }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -36,7 +36,7 @@ runs:
3636

3737
- name: Cache single-repo node_modules
3838
if: ${{ !fromJSON(inputs.skip-cache) && !fromJSON(inputs.is-monorepo) }}
39-
uses: actions/cache@v3
39+
uses: actions/cache@v4
4040
with:
4141
path: "node_modules/"
4242
key: ${{ steps.output-os-version.outputs.version }}-node${{ steps.output-node-version.outputs.version }}-yarn-${{ hashFiles('yarn.lock') }}

0 commit comments

Comments
 (0)