Skip to content

Commit

Permalink
chore!: Require Node 16 (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo authored Mar 8, 2022
1 parent c66a06c commit 6194e1d
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 250 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/checkout@v3'

- uses: 'actions/setup-node@v2'
- uses: 'actions/setup-node@v3'
with:
node-version: '16.x'

Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/setup-gcloud-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-node@v2"
- uses: actions/checkout@v3
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"
- id: build
Expand All @@ -50,8 +50,8 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-node@v2"
- uses: actions/checkout@v3
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"
- name: Build dependency
Expand Down Expand Up @@ -82,8 +82,8 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-node@v2"
- uses: actions/checkout@v3
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"
- id: build
Expand Down Expand Up @@ -111,8 +111,8 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-node@v2"
- uses: actions/checkout@v3
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- id: build
name: Build dist
run: |-
Expand All @@ -165,7 +165,7 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- id: build
name: Build dist
run: |-
Expand Down Expand Up @@ -201,9 +201,9 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/checkout@v3"

- uses: "actions/setup-node@v2"
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down Expand Up @@ -241,9 +241,9 @@ jobs:
id-token: "write"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: "actions/setup-node@v2"
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down Expand Up @@ -279,9 +279,9 @@ jobs:
- "macos-latest"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: "actions/setup-node@v2"
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down Expand Up @@ -316,9 +316,9 @@ jobs:
- "macos-latest"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/checkout@v3"

- uses: "actions/setup-node@v2"
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down Expand Up @@ -356,9 +356,9 @@ jobs:
id-token: "write"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: "actions/setup-node@v2"
- uses: "actions/setup-node@v3"
with:
node-version: "16.x"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setup-gcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/checkout@v3'

- uses: 'actions/setup-node@v2'
- uses: 'actions/setup-node@v3'
with:
node-version: '16.x'

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ Or integrate natively with other Google Cloud GitHub Actions:
+ uses: google-github-actions/deploy-cloudrun@v0
```


## Prerequisites

- This action requires Google Cloud credentials to execute gcloud commands.
See [Authorization](#Authorization) for more details.

- This action runs using Node 16. If you are using self-hosted GitHub Actions
runners, you must use runner version [2.285.0](https://github.com/actions/virtual-environments)
or newer.

## Usage

```yaml
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ inputs:
install_components:
description: List of Cloud SDK components to install
required: false

export_default_credentials:
description: |-
Export the provided credentials as Google Default Application Credentials.
Expand All @@ -79,6 +79,10 @@ inputs:
default: true
required: false

branding:
icon: 'terminal'
color: 'blue'

runs:
using: 'node16'
main: 'dist/main/index.js'
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand Down
4 changes: 2 additions & 2 deletions example-workflows/cloud-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Use the official lightweight Node.js 12 image.
# Use the official lightweight Node.js 16 image.
# https://hub.docker.com/_/node
FROM node:12-slim
FROM node:16-slim

# Create and change to the app directory.
WORKDIR /usr/src/app
Expand Down
6 changes: 3 additions & 3 deletions example-workflows/cloud-run/cloud-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand All @@ -61,11 +61,11 @@ jobs:
run: |-
docker build -t gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }} .
docker push gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
- name: Deploy to Cloud Run
run: |-
gcloud run deploy ${{ env.SERVICE }} \
--region ${{ env.REGION }} \
--image gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }} \
--platform "managed" \
--quiet
--quiet
2 changes: 1 addition & 1 deletion example-workflows/gae/app-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand Down
2 changes: 1 addition & 1 deletion example-workflows/gce/.github/workflows/gce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand Down
2 changes: 1 addition & 1 deletion example-workflows/gke/.github/workflows/gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
Expand Down
Loading

0 comments on commit 6194e1d

Please sign in to comment.