Skip to content

Get data from 20.3.1 #37

Get data from 20.3.1

Get data from 20.3.1 #37

Workflow file for this run

name: Commit targetdb repo
permissions:
contents: write
on:
pull_request:
types: [opened, synchronize]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ccstudio
MAJOR_VER: 20
MINOR_VER: 3
PATCH_VER: 1
BUILD_VER: "00005"
COMPONENTS: PF_SITARA_MCU,PF_ARM_MPU,PF_C28,PF_C6000SC,PF_HERCULES,PF_MMWAVE,PF_MSP430,PF_MSPM0,PF_MSPM33,PF_OMAPL,PF_PGA,PF_MSP432,PF_AUTO,PF_TM4C,PF_DIGITAL_POWER,PF_WCONN
jobs:
build-image-and-extract:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Create env vars
run: |
echo IMAGE=${{ env.REGISTRY }}/zigembeddedgroup/${{ env.IMAGE_NAME }}:${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ env.PATCH_VER }}.${{ env.BUILD_VER }} >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # This checks out the PR branch
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: false
tags: ${{ env.IMAGE }}
build-args: |
MAJOR_VER=${{ env.MAJOR_VER }}
MINOR_VER=${{ env.MINOR_VER }}
PATCH_VER=${{ env.PATCH_VER }}
BUILD_VER=${{ env.BUILD_VER }}
COMPONENTS=${{ env.COMPONENTS }}
- name: Create temporary container
id: container
run: echo "::set-output name=id::$(docker create ${{ env.IMAGE }})"
- name: Extract files from container
run: |
rm -rf targetdb msp430
docker cp ${{ steps.container.outputs.id }}:/opt/ti/ccs/ccs_base/common/targetdb .
docker cp ${{ steps.container.outputs.id }}:/opt/ti/ccs/ccs_base/msp430 tmp
mkdir -p msp430
cp tmp/include/*.cmd msp430
rm -rf tmp
- name: Remove temporary container
run: docker rm ${{ steps.container.outputs.id }}
- name: Commit changes
run: |
git add targetdb msp430
git commit -m "commit targetdb, version ${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ env.PATCH_VER }}.${{ env.BUILD_VER }}"
git push origin ${{ github.head_ref }}