Skip to content

Commit

Permalink
build.yml - add some fixes
Browse files Browse the repository at this point in the history
We should use the re-usable action for the GitHub credentials and also
remove them after use (very important for self-hosted ones).
  • Loading branch information
JanneKiiskila committed Sep 10, 2024
1 parent 131fff4 commit 937f8c4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build
on: push
on:
push:
workflow_dispatch:

jobs:
build-debs:
Expand All @@ -12,9 +14,10 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set GitHub access token via git config
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf "https://github"
- name: Set access token for internal repo access
uses: PelionIoT/actions/.github/actions/git-config@main
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
- name: Copy mbed_cloud_dev_credentials.c
env:
MBED_CLOUD_DEV_CREDENTIALS: ${{ secrets.MBED_CLOUD_DEV_CREDENTIALS_C_RYAN }}
Expand All @@ -28,4 +31,7 @@ jobs:
- name: Build
run: |
export DOCKER_OPTS='-i'; ./build-env/bin/docker-run-env.sh ${{ matrix.distro }} ./build-env/bin/build-all.sh --install --arch=${{ matrix.arch }}
docker system prune
docker system prune -f
- name: Cleanup .gitconfig
if: always()
run: rm -f ~/.gitconfig

0 comments on commit 937f8c4

Please sign in to comment.