-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Julien Bouquillon
committed
Sep 20, 2023
1 parent
76b8095
commit a7da585
Showing
14 changed files
with
756 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.