Skip to content

Commit

Permalink
clean up the workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
siosonel committed Oct 22, 2023
1 parent 731d2bb commit cafae53
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 200 deletions.
102 changes: 0 additions & 102 deletions .github/workflows/CD-create-container-release.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Release Images"
name: "Publish Application Image"

on:
push:
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/CD-publish-docker-image.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "Release Packages"
name: "Publish Packages"

on:
push:
branches:
- pkg-release
- publish-package
- fake-release
paths-ignore:
- '**.md'
Expand All @@ -20,17 +20,10 @@ on:
type: string
description: Build secret

jobs:
unit_test:
uses: ./.github/workflows/CI-unit.yml
secrets: inherit # pragma: allowlist secret

integration_test:
uses: ./.github/workflows/CI-integration.yml
secrets: inherit # pragma: allowlist secret
workflow_call: {}

build:
needs: [unit_test, integration_test]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -78,7 +71,7 @@ jobs:
scope: '@sjcrh'

- name: ⚡ Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -96,17 +89,16 @@ jobs:
elif [[ "$NOTES" == *"Fixes:"* ]]; then
VERTYPE=patch
fi
# initial dot makes the variables of the call script in-scope
. ./build/ci-version-update.sh $VERTYPE -w -x=container
echo "UPDATED=$UPDATED" >> $GITHUB_ENV
- name: Publish packages
run: |
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "pkg-release" && "$BRANCH" != "master" ]]; then
echo "skipping publishing"
else
# ./build/bump.js is called from within `ci-version-update.sh`,
# get the same updated workspaces but don't edit the package.json's (no -w option)
UPDATED=$(./build/bump.js prerelease)
./build/ci-npm-publish.sh "$UPDATED"
if [[ "$BRANCH" != "master" ]]; then
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/CD-publish-updated-image.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/CD-release-chain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Release Packages, Optional Image"

on:
push:
branches:
- release-chain
- fake-release
paths-ignore:
- '**.md'
- '**.txt'
- '.**ignore'
- 'docs/**'
# TODO: what if package.dependencies, files were updated?
# this is meant to avoid triggering the on.push event for the version bump
- '**package*.json'

workflow_dispatch:
inputs:
build_secret:
type: string
description: Build secret

jobs:
unit_test:
uses: ./.github/workflows/CI-unit.yml
secrets: inherit # pragma: allowlist secret

integration_test:
uses: ./.github/workflows/CI-integration.yml
secrets: inherit # pragma: allowlist secret

publish_packages:
needs: [unit_test, integration_test]
uses: ./.github/workflows/CD-publish-packages.yml
secrets: inherit # pragma: allowlist secret

publish_app_image:
if: ${{ github.ref_name }} == 'publish-app-image'
needs: [ publish_packages ]
uses: ./.github/workflows/CD-publish-app-image.yml
secrets: inherit # pragma: allowlist secret
2 changes: 1 addition & 1 deletion .github/workflows/CI-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: ⚡ Cache
if: contains(env.WS_TO_TEST, 'rust')
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand Down

0 comments on commit cafae53

Please sign in to comment.