Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[READY] - openwrt build follow up and github actions #817

Merged
merged 9 commits into from
Feb 1, 2025
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## Description

<!--
Brief description of the Issue
-->

## Acceptance Criteria

<!--
What is the expected outcome that resolves this issue?
-->
20 changes: 18 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
## Description of PR

Brief description of the PR
<!--
Brief description of the changes in PR

If change is related to an open issue template include at the top of your
description.
-->

## Previous Behavior

<!--
What was the behavior before this PR?

Remove this section if not relevant
-->

## New Behavior

<!--
What is the new behavior being introduced in this PR?

Remove this section if not relevant
-->

## Tests

How was this PR tested?
<!--
How was this PR tested? Please provide as much detail as possible
so we can ensure this change is working as intended before being merged.
-->
18 changes: 14 additions & 4 deletions .github/workflows/openwrt-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
container:
# Ubuntu 24.04
image: sarcasticadmin/openwrt-build@sha256:25ac9d0dd4eeaad1aaaa7c82c09e9ecc103c69224fc55eb9717c4cfb018a5281
# Since user is ubuntu and gets 1000 from inside container
options: --user 1000
# Since user is openwrt and gets 1001 from inside container
options: --user 1001
sarcasticadmin marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v1
with:
Expand All @@ -28,18 +28,28 @@ jobs:
cd openwrt
TARGET=${{ matrix.target }} make templates build-img package 2>&1 | tee ${{ matrix.target }}-build.log
- name: 'Upload openwrt build artifact tarball'
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.6.0
with:
name: ${{ matrix.target }}-openwrt-build-artifacts
# Cant use relative pathing .. or . for artifacts action
# Also dont bother with '${{ github.workspace }}'
path: |
openwrt/build/artifacts/*.tar.gz
retention-days: 30
# Since we cant turn off compression set to lowest level
compression-level: 0
# rerunning jobs overwrites artifacts from previous runs
# this was the default behavior in v3.x
# ref: https://github.com/actions/upload-artifact/blob/v3.1.1/README.md?plain=1#L152
overwrite: true
# if we dont have images, scream loudly
if-no-files-found: "error"
- name: 'Upload openwrt build log'
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.6.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably never going to happen but do we want to use if-no-files-found: just in case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to both jobs

with:
name: ${{ matrix.target }}-openwrt-buildlog
path: |
openwrt/*build.log
retention-days: 30
overwrite: true
if-no-files-found: "error"
2 changes: 1 addition & 1 deletion .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# is not a PR event
REF=$(curl -sSf \
--url ${{ steps.pr-standardize-comment.outputs.url }} \
--header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'Authorization: Bearer ${{ secrets.SCALE_GITHUB_TOKEN }}' \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant test this further until it lands in master for the PR comment trigger to gitlab-ci, will do a follow up after we merge this though

--header 'Content-Type: application/json' | jq -r '.head.ref' \
)
echo "subcomm=$SUBCOMM" >> $GITHUB_OUTPUT
Expand Down
Loading