Skip to content

Commit

Permalink
chore: touchup toml and script (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
domire8 authored Oct 22, 2024
1 parent 8501d1a commit dd36a32
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
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:
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

0 comments on commit dd36a32

Please sign in to comment.