Proto Build Workflow #14
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
# yamllint disable rule:line-length | |
--- | |
name: Proto Build Workflow | |
on: | |
# push: | |
# branches: | |
# - "main" | |
# tags: | |
# # semver, e.g. 1.2.0 (does not match 0.1.2) | |
# - "[1-9]+.[0-9]+.[0-9]+" | |
# # semver with prerelease info, e.g. 1.0.2-beta.1 or 1.2.3-rc.10 | |
# - "[1-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+" | |
# # do not match prerelease starting w/ 0, e.g. 1.0.2-beta.0 or 1.2.3-rc.01 | |
# - "![1-9]+.[0-9]+.[0-9]+-[a-z]+.[0]*" | |
# # semver with date info, e.g. 1.0.2-20221125 | |
# - "[1-9]+.[0-9]+.[0-9]+-[0-9]+" | |
# # do not match date starting w/ 0, e.g. 1.0.2-01232023 | |
# - "![1-9]+.[0-9]+.[0-9]+-[0]*" | |
# pull_request: | |
# branches: | |
# - "main" | |
workflow_dispatch: | |
jobs: | |
build_proto_image: | |
name: Build Proto Image | |
runs-on: self-hosted #ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# | |
- name: Build Proto image | |
uses: ./.github/actions/docker-build-push-action | |
with: | |
dockerfile: ./Dockerfile.proto | |
push: false | |
load: true | |
tags: axisecp/acap-runtime:protofiles | |
# platforms: linux/arm64 | |
- name: List Docker images | |
run: docker images | |
- name: Extract proto files | |
run: | | |
container_id=$(docker create axisecp/acap-runtime:protofiles) | |
docker cp $container_id:/build/param/proto_utils ./proto_utils_param | |
docker cp $container_id:/build/vdo/proto_utils ./proto_utils_vdo | |
docker cp $container_id:/build/tf/proto_utils ./proto_utils_tf | |
docker rm $container_id | |
- name: Upload proto files artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: proto-files | |
path: | | |
./proto_utils_param | |
./proto_utils_vdo | |
./proto_utils_tf | |
# - name: Clean up | |
# if: always() | |
# run: | | |
# docker image prune -af | |
# |