Skip to content

Removed the default config from the action #428

Removed the default config from the action

Removed the default config from the action #428

Workflow file for this run

name: Checks
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main, "version/*"]
jobs:
check:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
# When we develop this internally we have to go through the repo1 mirror
# When we run it in GitHub its running outside of the optum network and cant access repo1
# Ideally these lock files wouldn't store the repository in it but just the sha of the module
# For now we have to remove the lock file in order to install the dependencies in the ci server
- name: Install Dependencies
run: |
rm deno.lock
deno install --no-lock
- run: deno fmt --check
- run: deno lint
- run: deno task test
- id: parse_version
name: Get the Version
run: |
deno run -A main.ts get
- name: Print the Version
run: |
cat >> $GITHUB_STEP_SUMMARY<<EOF
# Version
\`\`\`
${{ steps.parse_version.outputs.version }}
\`\`\`
| part | value |
| ---------- | --- |
| version | \`${{ steps.parse_version.outputs.version }}\` |
| major | \`${{ steps.parse_version.outputs.major }}\` |
| minor | \`${{ steps.parse_version.outputs.minor }}\` |
| patch | \`${{ steps.parse_version.outputs.patch }}\` |
| prerelease | \`${{ steps.parse_version.outputs.prerelease || ' ' }}\` |
| build | \`${{ steps.parse_version.outputs.build || ' ' }}\` |
EOF
test-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./setup
with:
version: 1.0.10
- name: Default
uses: ./
- name: Get
uses: ./
with:
command: get
- name: Set
uses: ./
with:
command: set
value: 1.2.3
- name: Inc Major
uses: ./
with:
command: inc
sub-command: major
- name: Inc Minor
uses: ./
with:
command: inc
sub-command: minor
- name: Inc Patch
uses: ./
with:
command: inc
sub-command: patch
- name: Inc None
uses: ./
with:
command: inc
sub-command: none
- name: Parse
uses: ./
with:
command: parse
value: 1.2.3-alpha.1+build.123
- name: Equal
uses: ./
with:
command: eq
value: 1.2.3
compare-to: 1.2.3
- name: Compare
uses: ./
with:
command: cmp
value: 1.2.3
compare-to: 1.2.3
- name: Greater Than
uses: ./
with:
command: gt
value: 1.2.3
compare-to: 1.0.0
- name: Greater Than or Equal
uses: ./
with:
command: gte
value: 1.2.3
compare-to: 1.2.3
- name: Less Than
uses: ./
with:
command: lt
value: 1.2.3
compare-to: 2.0.0
- name: Less Than or Equal
uses: ./
with:
command: lte
value: 1.2.3
compare-to: 1.2.3
- name: Sort
uses: ./
with:
command: sort
value: 2.0.0 1.0.0 3.0.0
docker:
runs-on: ubuntu-latest
needs:
- check
- test-action
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v4
with:
push: false
tags: optum/semver-cli:pr
platforms: linux/amd64