Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: touchup toml and script #4

Merged
merged 8 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/build.yml → .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Build and Test

on:
push:
LouisBrunner marked this conversation as resolved.
Show resolved Hide resolved
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
packages: write

jobs:
test:
Expand All @@ -15,9 +22,10 @@ jobs:
run: |
docker build -f aica-package.toml --target test .

build:
build-push:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
name: Build
name: Build and push
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -36,6 +44,6 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}/template-component-package:latest
tags: ghcr.io/${{ github.repository_owner }}/template-component-package:latest
context: .
file: aica-package.toml
4 changes: 2 additions & 2 deletions aica-package.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#syntax=ghcr.io/aica-technology/package-builder:v1.1.1
#syntax=ghcr.io/aica-technology/package-builder:v1.2.1

[metadata]
version = "0.0.1"
Expand All @@ -23,7 +23,7 @@ image = "v2.0.0-jazzy"

[build.dependencies]
"@aica/foss/control-libraries" = "v9.0.0"
"@aica/foss/modulo" = "v5.0.0"
"@aica/foss/modulo" = "v5.0.1"

[build.packages.template-component-package]
source = "./source/template_component_package"
Expand Down
4 changes: 3 additions & 1 deletion rename_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Use --dry-run to prevent any filesystem changes while testing the usage.
This script replaces all text occurrences of template_component_package with
NEW_PACKAGE_NAME in all files in the following search paths:
- ./.devcontainer.json
- ./.github/workflows/build-test.yml
- ./aica-package.toml
- ./source/**

Expand Down Expand Up @@ -100,12 +101,13 @@ echo " - ${NEW_NAME}"
echo " - ${NEW_NAME//_/-}"
echo "in the following search paths:"
echo " - ${SCRIPT_DIR}/.devcontainer.json"
echo " - ${SCRIPT_DIR}/.github/workflows/build-test.yml"
echo " - ${SCRIPT_DIR}/aica-package.toml"
echo " - ${SCRIPT_DIR}/source/**"
echo

replace_text_in_file "${SCRIPT_DIR}/.devcontainer.json"
replace_text_in_file "${SCRIPT_DIR}/.github/workflows/build.yml"
replace_text_in_file "${SCRIPT_DIR}/.github/workflows/build-test.yml"
replace_text_in_file "${SCRIPT_DIR}/aica-package.toml"

RENAME_DIRECTORIES=()
Expand Down
Loading