From 7e2cd55530b08ba0b46b94a99684a2c22592cc96 Mon Sep 17 00:00:00 2001 From: Daniel Sarfati Date: Mon, 15 Apr 2024 15:18:25 -0600 Subject: [PATCH] Update SCE APIs --- .github/workflows/ci.yml | 8 +++----- CODEOWNERS | 3 --- action.yml | 29 +++++++++++++++++------------ src/main.ts | 27 +++++++++++++++++---------- 4 files changed, 37 insertions(+), 30 deletions(-) delete mode 100644 CODEOWNERS diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6d2861..a50b1be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,8 +57,6 @@ jobs: id: test-action uses: ./ with: - milliseconds: 2000 - - - name: Print Output - id: output - run: echo "${{ steps.test-action.outputs.time }}" + salad-organization: salad + salad-project: development + salad-container-group: test-actions diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 2e08bd2..0000000 --- a/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -# Repository CODEOWNERS - -* @actions/actions-oss-maintainers diff --git a/action.yml b/action.yml index 101186a..474f360 100644 --- a/action.yml +++ b/action.yml @@ -1,23 +1,28 @@ -name: 'The name of your action here' -description: 'Provide a description here' -author: 'Your name or organization here' +name: 'Salad Container Engine Action' +description: 'Automatically deploy new GHCR containers to your Salad Account.' +author: 'SaladTechnologies' # Add your action's branding here. This will appear on the GitHub Marketplace. branding: - icon: 'heart' - color: 'red' + icon: 'cloud-snow' + color: 'green' # Define your inputs here. inputs: - milliseconds: - description: 'Your input description here' + salad-organization: + description: 'Your Salad organization name.' + required: true + salad-project: + description: 'Your Salad project name.' + required: true + salad-container-group: + description: 'Your Salad container group name.' required: true - default: '1000' -# Define your outputs here. -outputs: - time: - description: 'Your output description here' +# # Define your outputs here. +# outputs: +# time: +# description: 'Your output description here' runs: using: node20 diff --git a/src/main.ts b/src/main.ts index c804f90..b353f3e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,4 @@ import * as core from '@actions/core' -import { wait } from './wait' /** * The main function for the action. @@ -7,18 +6,26 @@ import { wait } from './wait' */ export async function run(): Promise { try { - const ms: string = core.getInput('milliseconds') + core.warning('Starting action') + let org = core.getInput('salad-organization') + let proj = core.getInput('salad-project') + let containerGroup = core.getInput('salad-container-group') - // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true - core.debug(`Waiting ${ms} milliseconds ...`) + core.warning('Org:' + org) + core.warning('Project:' + proj) + core.warning('ContainerGroup:' + containerGroup) + // const ms: string = core.getInput('milliseconds') - // Log the current timestamp, wait, then log the new timestamp - core.debug(new Date().toTimeString()) - await wait(parseInt(ms, 10)) - core.debug(new Date().toTimeString()) + // // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true + // core.debug(`Waiting ${ms} milliseconds ...`) - // Set outputs for other workflow steps to use - core.setOutput('time', new Date().toTimeString()) + // // Log the current timestamp, wait, then log the new timestamp + // core.debug(new Date().toTimeString()) + // await wait(parseInt(ms, 10)) + // core.debug(new Date().toTimeString()) + + // // Set outputs for other workflow steps to use + // core.setOutput('time', new Date().toTimeString()) } catch (error) { // Fail the workflow run if an error occurs if (error instanceof Error) core.setFailed(error.message)