Skip to content

Commit

Permalink
build: use composit actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbnetley committed Jan 6, 2025
1 parent 5237f3a commit c2f175c
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/actions/build-and-deploy-composite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and deploy ${{ inputs.environment }}

inputs:
environment:
description: Environment to deploy too
required: true
type: choice
options:
- develop
- production
node_version:
type: string
required: true
VERCEL_ORG_ID:
description: 'org id'
required: true
VERCEL_PROJECT_ID:
description: 'Project Id'
required: true

outputs:
success:
description: if action was successful
value: ${{ steps.random-number-generator.outputs.random-number }}

runs:
using: "composite"
steps:
- name: test
run: echo "test" ${{ inputs.environment }} ${{ inputs.node_version }}
24 changes: 24 additions & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Debug

on:
pull_request:
branches:
- dev
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: test
uses: ./github-actions/build-and-build-and-deploy-composite.yml
with:
environment: develop
node_version: 20
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

30 changes: 30 additions & 0 deletions github-actions/build-and-deploy-composite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and deploy ${{ inputs.environment }}

inputs:
environment:
description: Environment to deploy too
required: true
type: choice
options:
- develop
- production
node_version:
type: string
required: true
VERCEL_ORG_ID:
description: 'org id'
required: true
VERCEL_PROJECT_ID:
description: 'Project Id'
required: true

outputs:
success:
description: if action was successful
value: ${{ steps.random-number-generator.outputs.random-number }}

runs:
using: "composite"
steps:
- name: test
run: echo "test" ${{ inputs.environment }} ${{ inputs.node_version }}

0 comments on commit c2f175c

Please sign in to comment.