Compare commits
No commits in common. "main" and "v0.2.1" have entirely different histories.
13 changed files with 10 additions and 176 deletions
|
@ -38,7 +38,7 @@ jobs:
|
||||||
- /buildkit-certs:/buildkit-certs
|
- /buildkit-certs:/buildkit-certs
|
||||||
steps:
|
steps:
|
||||||
- name: ⏬ Checkout code repository
|
- name: ⏬ Checkout code repository
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 📌 Extract metadata (tags, labels) for Docker
|
- name: 📌 Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
|
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
image: devthefuture/act-runner:latest
|
image: devthefuture/act-runner:latest
|
||||||
steps:
|
steps:
|
||||||
- name: 🎡 Check out the Helm chart repository
|
- name: 🎡 Check out the Helm chart repository
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: "${{ github.repository_owner }}/appsets"
|
repository: "${{ github.repository_owner }}/appsets"
|
||||||
token: ${{ secrets.M8A_ORG_BOT_REPO_TOKEN }}
|
token: ${{ secrets.M8A_ORG_BOT_REPO_TOKEN }}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
FROM minio/mc:RELEASE.2024-06-24T19-40-33Z.fips
|
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
@ -1,7 +0,0 @@
|
||||||
# minio Action
|
|
||||||
|
|
||||||
This action allows you to upload objects to a MinIO server
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
forked from https://github.com/cloudkernels/minio-upload
|
|
|
@ -1,35 +0,0 @@
|
||||||
# action.yml
|
|
||||||
|
|
||||||
name: minio-upload
|
|
||||||
description: "Action that lets you upload objects from a MinIO server"
|
|
||||||
inputs:
|
|
||||||
url:
|
|
||||||
description: "URL of the MinIO server"
|
|
||||||
required: true
|
|
||||||
access-key:
|
|
||||||
description: "Access Key for the MinIO server"
|
|
||||||
required: true
|
|
||||||
secret-key:
|
|
||||||
description: "Secret Key for the MinIO server"
|
|
||||||
required: true
|
|
||||||
local-path:
|
|
||||||
description: 'Path of the local object'
|
|
||||||
required: true
|
|
||||||
default: './'
|
|
||||||
remote-path:
|
|
||||||
description: 'Path to remote object'
|
|
||||||
required: true
|
|
||||||
policy:
|
|
||||||
description: 'Policy'
|
|
||||||
required: false
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'docker'
|
|
||||||
image: 'Dockerfile'
|
|
||||||
args:
|
|
||||||
- ${{ inputs.url }}
|
|
||||||
- ${{ inputs.access-key }}
|
|
||||||
- ${{ inputs.secret-key }}
|
|
||||||
- ${{ inputs.local-path }}
|
|
||||||
- ${{ inputs.remote-path }}
|
|
||||||
- ${{ inputs.policy }}
|
|
|
@ -1,62 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
LOG_NAME="minio"
|
|
||||||
|
|
||||||
info() {
|
|
||||||
[ -t 1 ] && [ -n "$TERM" ] \
|
|
||||||
&& echo "$(tput setaf 2)[$LOG_NAME]$(tput sgr0) $*" \
|
|
||||||
|| echo "[$LOG_NAME] $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
err() {
|
|
||||||
[ -t 2 ] && [ -n "$TERM" ] \
|
|
||||||
&& echo -e "$(tput setaf 1)[$LOG_NAME]$(tput sgr0) $*" 1>&2 \
|
|
||||||
|| echo -e "[$LOG_NAME] $*" 1>&2
|
|
||||||
}
|
|
||||||
|
|
||||||
die() {
|
|
||||||
err "$@"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
ok_or_die() {
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
die $1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $# -lt 5 ]] ; then
|
|
||||||
die "Usage: $0 url access_key secret_key local_path remote_path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
url=$1
|
|
||||||
access_key=$2
|
|
||||||
secret_key=$3
|
|
||||||
local_path=$4
|
|
||||||
remote_path=$5
|
|
||||||
|
|
||||||
mc alias set s3 $url $access_key $secret_key
|
|
||||||
ok_or_die "Could not set mc alias"
|
|
||||||
|
|
||||||
if [[ "$local_path" == */ ]]; then
|
|
||||||
copy_command="mc cp -r"
|
|
||||||
else
|
|
||||||
copy_command="mc cp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS=' ' read -r -a remote_paths <<< "$remote_path"
|
|
||||||
for rpath in "${remote_paths[@]}"; do
|
|
||||||
info "Will upload $local_path to $rpath"
|
|
||||||
$copy_command "$local_path" "s3/$rpath"
|
|
||||||
ok_or_die "Could not upload object"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $# -eq 6 ]] ; then
|
|
||||||
if [[ $6 -eq 1 ]] ; then
|
|
||||||
info "Will make $remote_path public"
|
|
||||||
mc anonymous -r set download s3/$remote_path
|
|
||||||
else
|
|
||||||
info "Will make $remote_path private"
|
|
||||||
mc anonymous -r set private s3/$remote_path || true
|
|
||||||
fi
|
|
||||||
fi
|
|
4
uptag/.pnp.cjs
generated
4
uptag/.pnp.cjs
generated
|
@ -34,7 +34,7 @@ const RAW_RUNTIME_STATE =
|
||||||
]],\
|
]],\
|
||||||
["lodash.set", [\
|
["lodash.set", [\
|
||||||
["npm:4.3.2", {\
|
["npm:4.3.2", {\
|
||||||
"packageLocation": "./.yarn/cache/lodash.set-npm-4.3.2-7586c942c2-c641d31905.zip/node_modules/lodash.set/",\
|
"packageLocation": "../../../../home/jo/.yarn/berry/cache/lodash.set-npm-4.3.2-7586c942c2-10c0.zip/node_modules/lodash.set/",\
|
||||||
"packageDependencies": [\
|
"packageDependencies": [\
|
||||||
["lodash.set", "npm:4.3.2"]\
|
["lodash.set", "npm:4.3.2"]\
|
||||||
],\
|
],\
|
||||||
|
@ -54,7 +54,7 @@ const RAW_RUNTIME_STATE =
|
||||||
]],\
|
]],\
|
||||||
["yaml", [\
|
["yaml", [\
|
||||||
["npm:2.3.4", {\
|
["npm:2.3.4", {\
|
||||||
"packageLocation": "./.yarn/cache/yaml-npm-2.3.4-8bb6dc2c0d-cf03b68f8f.zip/node_modules/yaml/",\
|
"packageLocation": "../../../../home/jo/.yarn/berry/cache/yaml-npm-2.3.4-8bb6dc2c0d-10c0.zip/node_modules/yaml/",\
|
||||||
"packageDependencies": [\
|
"packageDependencies": [\
|
||||||
["yaml", "npm:2.3.4"]\
|
["yaml", "npm:2.3.4"]\
|
||||||
],\
|
],\
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,2 +1 @@
|
||||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
||||||
enableGlobalCache: false
|
|
|
@ -45,17 +45,14 @@ runs:
|
||||||
|
|
||||||
echo "Using tag: $TAG"
|
echo "Using tag: $TAG"
|
||||||
|
|
||||||
export CD_WORKING_DIR="$PWD"
|
yarn node $GITHUB_ACTION_PATH/index.js
|
||||||
cd $GITHUB_ACTION_PATH
|
|
||||||
yarn node index.js
|
|
||||||
cd "$CD_WORKING_DIR"
|
|
||||||
|
|
||||||
git config user.name "forgejo-actions"
|
git config user.name "forgejo-actions"
|
||||||
git config user.email "bot@devthefuture.org"
|
git config user.email "bot@devthefuture.org"
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
if [ "$CD_COMMIT" != "false" ]; then
|
if [ "$CD_COMMIT" != "false" ]; then
|
||||||
git commit --allow-empty -m "chore: set $CD_ENV image.tag=$TAG"
|
git commit --allow-empty -m "chore: set $CD_ENV/$CD_APP image.tag=$TAG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CD_PUSH" != "false" ]; then
|
if [ "$CD_PUSH" != "false" ]; then
|
||||||
|
|
|
@ -34,7 +34,6 @@ const main = async () => {
|
||||||
const cdApp = process.env.CD_APP;
|
const cdApp = process.env.CD_APP;
|
||||||
const cdEnv = process.env.CD_ENV;
|
const cdEnv = process.env.CD_ENV;
|
||||||
const cdKey = process.env.CD_KEY;
|
const cdKey = process.env.CD_KEY;
|
||||||
const workingDir = process.env.CD_WORKING_DIR;
|
|
||||||
let apps;
|
let apps;
|
||||||
if (cdApp.includes("\n")) {
|
if (cdApp.includes("\n")) {
|
||||||
apps = yamlLoadAll(cdApp);
|
apps = yamlLoadAll(cdApp);
|
||||||
|
@ -46,15 +45,11 @@ const main = async () => {
|
||||||
for (const env of envs) {
|
for (const env of envs) {
|
||||||
const { name, key = cdKey, tag = defaultTag } = app;
|
const { name, key = cdKey, tag = defaultTag } = app;
|
||||||
const valuesFile = `apps/${name}/envs/${env}/values.yaml`;
|
const valuesFile = `apps/${name}/envs/${env}/values.yaml`;
|
||||||
const keys = key.split(",")
|
console.log(`${valuesFile} -> ${key}=${tag}`);
|
||||||
const valuesFilePath = `${workingDir}/${valuesFile}`;
|
const valuesRaw = await fs.readFile(valuesFile, { encoding: "utf-8" })
|
||||||
const valuesRaw = await fs.readFile(valuesFilePath, { encoding: "utf-8" })
|
|
||||||
const values = yaml.parse(valuesRaw);
|
const values = yaml.parse(valuesRaw);
|
||||||
for(const k of keys){
|
set(values, key, tag);
|
||||||
console.log(`${valuesFile} -> ${k}=${tag}`);
|
await fs.writeFile(yaml.stringify(values), { encoding: "utf-8" });
|
||||||
set(values, k, tag);
|
|
||||||
}
|
|
||||||
await fs.writeFile(valuesFilePath, yaml.stringify(values));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
# based on https://gist.github.com/belgattitude/042f9caf10d029badbde6cf9d43e400a
|
|
||||||
name: 'Monorepo install (yarn)'
|
|
||||||
description: 'Run yarn install with node_modules linker and cache enabled'
|
|
||||||
inputs:
|
|
||||||
cwd:
|
|
||||||
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
|
|
||||||
required: false
|
|
||||||
default: '.'
|
|
||||||
cache-prefix:
|
|
||||||
description: 'Add a specific cache-prefix'
|
|
||||||
required: false
|
|
||||||
default: 'default'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: ⚙️ Expose yarn config as "$GITHUB_OUTPUT"
|
|
||||||
id: yarn-config
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{ inputs.cwd }}
|
|
||||||
env:
|
|
||||||
YARN_ENABLE_GLOBAL_CACHE: 'false'
|
|
||||||
run: |
|
|
||||||
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
||||||
echo "CURRENT_NODE_VERSION="node-$(node --version)"" >> $GITHUB_OUTPUT
|
|
||||||
echo "CURRENT_BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's,/,-,g')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: ♻️ Restore yarn cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: yarn-download-cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
|
|
||||||
key: yarn-download-cache-${{ inputs.cache-prefix }}-${{ hashFiles(format('{0}/yarn.lock', inputs.cwd), format('{0}/.yarnrc.yml', inputs.cwd)) }}
|
|
||||||
restore-keys: |
|
|
||||||
yarn-download-cache-${{ inputs.cache-prefix }}-
|
|
||||||
|
|
||||||
- name: 📥 Install dependencies
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{ inputs.cwd }}
|
|
||||||
run: yarn install --immutable --inline-builds
|
|
||||||
env:
|
|
||||||
# Overrides/align yarnrc.yml options (v3, v4) for a CI context
|
|
||||||
YARN_ENABLE_GLOBAL_CACHE: 'false' # Use local cache folder to keep downloaded archives
|
|
||||||
YARN_ENABLE_MIRROR: 'false' # Prevent populating global cache for caches misses (local cache only)
|
|
||||||
YARN_NM_MODE: 'hardlinks-local' # Reduce node_modules size
|
|
||||||
YARN_INSTALL_STATE_PATH: '.yarn/ci-cache/install-state.gz' # Might speed up resolution step when node_modules present
|
|
||||||
# Other environment variables
|
|
||||||
HUSKY: '0' # By default do not run HUSKY install
|
|
Loading…
Add table
Reference in a new issue