Skip to content

Commit

Permalink
Merge pull request #8 from haarchri/main
Browse files Browse the repository at this point in the history
feat(action): switch actions
  • Loading branch information
haarchri authored Dec 16, 2024
2 parents f2ac0d7 + ee090b3 commit a2fca18
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
name: Build and Deploy
name: CI

on:
push:
branches:
- main
pull_request:
pull_request: {}
workflow_dispatch:
inputs:
version:
description: Package version (e.g. v0.1.0)
required: false

env:
UP_TOKEN: ${{ secrets.UP_TOKEN }}
UP_API_TOKEN: ${{ secrets.UP_API_TOKEN }}
UP_ORG: ${{ secrets.UP_ORG }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Run Up CLI Build and Push
if: env.UP_TOKEN != ''
uses: upbound/up-project-action@v1
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install and login with up
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
uses: upbound/action-up@v1
with:
api-token: ${{ secrets.UP_API_TOKEN }}
organization: ${{ secrets.UP_ORG }}

- name: Build and Push Upbound project
if: env.UP_API_TOKEN != ''
uses: upbound/action-up-project@v1
with:
up_token: ${{ secrets.UP_TOKEN }}
endpoint: https://cli.upbound.io
channel: main
push-project: true
tag: ${{ inputs.version || '' }}

0 comments on commit a2fca18

Please sign in to comment.