diff --git a/.github/workflows/build.yml b/.github/workflows/build-test.yml similarity index 74% rename from .github/workflows/build.yml rename to .github/workflows/build-test.yml index a36bad4..3c37db0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-test.yml @@ -2,6 +2,13 @@ name: Build and Test on: push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + packages: write jobs: test: @@ -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 @@ -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 diff --git a/aica-package.toml b/aica-package.toml index 76026f7..2976e2d 100644 --- a/aica-package.toml +++ b/aica-package.toml @@ -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" @@ -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" diff --git a/rename_package.sh b/rename_package.sh index 730085e..3ce97b9 100755 --- a/rename_package.sh +++ b/rename_package.sh @@ -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/** @@ -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=()