Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Sep 20, 2023
1 parent 76b8095 commit a7da585
Show file tree
Hide file tree
Showing 14 changed files with 756 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-image-degit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 📦 Build Docker Image Degit 📁

on:
push:
branches:
- '**'
- '!master'
tags:
- '**'
paths:
- .github/kontinuousVersion
- packages/degit

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}

jobs:
build-base-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build image
uses: ./.github/actions/build-images
with:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: packages/degit/Dockerfile
destination: /degit

69 changes: 69 additions & 0 deletions .github/workflows/build-image-kontinuous.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 📦 Build Docker Image Kontinuous 🥷

on:
push:
branches:
- '**'
- '!master'
tags:
- '**'
paths:
- .github/kontinuousVersion
- packages/kontinuous/**
- packages/common/**
- packages/helm-tree/**
- plugins/**
- .github/actions/**
- yarn.lock
- .yarnrc.yml

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}

jobs:
build-base-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build image
uses: ./.github/actions/build-images
with:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: packages/kontinuous/Dockerfile
destination: ""

build-actions:
needs: [build-base-images]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- destination: "/deploy-via-github"
dockerfile: .github/actions/deploy-via-github/Dockerfile
context: .github/actions/deploy-via-github
- destination: "/deploy-via-webhook"
dockerfile: .github/actions/deploy-via-webhook/Dockerfile
context: .github/actions/deploy-via-webhook
- destination: "/env"
dockerfile: .github/actions/env/Dockerfile
context: .github/actions/env
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build image
uses: ./.github/actions/build-images
with:
token: ${{ secrets.GITHUB_TOKEN }}
context: ${{ matrix.context }}
dockerfile: ${{ matrix.dockerfile }}
destination: ${{ matrix.destination }}

37 changes: 37 additions & 0 deletions .github/workflows/build-image-wait-needs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 📦 Build Docker Image Wait-needs ⌛

on:
push:
branches:
- '**'
- '!master'
tags:
- '**'
paths:
- .github/kontinuousVersion
- packages/wait-needs/**
- packages/common/**
- packages/helm-tree/**
- yarn.lock
- .yarnrc.yml

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}

jobs:
build-base-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build image
uses: ./.github/actions/build-images
with:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: packages/wait-needs/Dockerfile
destination: /wait-needs

37 changes: 37 additions & 0 deletions .github/workflows/build-image-webhook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 📦 Build Docker Image Webhook 🪝

on:
push:
branches:
- '**'
- '!master'
tags:
- '**'
paths:
- .github/kontinuousVersion
- packages/webhook/**
- packages/common/**
- packages/helm-tree/**
- yarn.lock
- .yarnrc.yml

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}

jobs:
build-base-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build image
uses: ./.github/actions/build-images
with:
token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: packages/webhook/Dockerfile
destination: /webhook

72 changes: 72 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: ✅ CodeQL 📝

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '29 14 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
51 changes: 51 additions & 0 deletions .github/workflows/release-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 🎉 Release Commit

on:
workflow_dispatch:
pull_request:
types: [closed]


concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_name }}

jobs:
yarn-release:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
name: Create release using commit-and-tag-version
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}

- name: Install dependencies
run: yarn --immutable

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.SOCIALGROOVYBOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.SOCIALGROOVYBOT_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_push_gpgsign: false
git_tag_gpgsign: true

- name: Run release
env:
GIT_AUTHOR_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }}
run: yarn release

- name: Push release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url --push origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git push -f --follow-tags origin master
67 changes: 67 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: ✨ Release Publish

on:
push:
tags:
- v*.*

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_name }}

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'

- name: yarn install
shell: bash
run: yarn --immutable

- name: build with ncc
shell: bash
run: yarn workspace kontinuous build

- name: prepublish
shell: bash
run: |
cp LICENSE README.md packages/kontinuous/
cat <<< $(jq "del(.dependencies, .devDependencies, .scripts, .main)" packages/kontinuous/package.json) > packages/kontinuous/package.json
- name: extract npm tag
id: npm-tag
shell: bash
run: |
if [[ "$GITHUB_REF" == *"alpha"* ]]; then
npm_tag="alpha"
elif [[ "$GITHUB_REF" == *"beta"* ]]; then
npm_tag="beta"
else
npm_tag="latest"
fi
echo "tag=$npm_tag" >> $GITHUB_OUTPUT
- id: publish-kontinuous
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.SOCIALGROOVYBOT_NPM_TOKEN }}
package: packages/kontinuous/package.json
tag: ${{ steps.npm-tag.outputs.tag }}

- if: steps.publish-kontinuous.outputs.type
run: |
echo "Version changed: ${{ steps.publish-kontinuous.outputs.old-version }} => ${{ steps.publish-kontinuous.outputs.version }}"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }}
generate_release_notes: true
Loading

0 comments on commit a7da585

Please sign in to comment.