Skip to content

Commit

Permalink
ci: clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuton committed Feb 6, 2024
1 parent 14b7963 commit 3e02c30
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Containers
name: Images
run-name: "Building images 🚀"
on: [push]
jobs:
jobs:
build-job:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfg:
- { model: "rt-ax92u", sdk: "src-rt-5.02axhnd", ui: "default", skip: false }
Expand All @@ -32,24 +33,25 @@ jobs:
SKIP_BUILD: ${{ matrix.cfg.skip }}
GIT_REPO: "https://github.com/gnuton/asuswrt-merlin.ng.git"
PROJECT_DIR: "/project/asuswrt-merlin.ng"
ARTIFACTS_DIR: "/project/artifacts"
CHANGELOG_FILE: "/tmp/CHANGELOG"
PROJECTBASEDIR: "/project" # Fixes https://github.com/SonarSource/sonarcloud-github-action/pull/58
options: --user docker
volumes:
- ${{ github.workspace }}:/project
- /mnt:/project
steps:
- name: Fix permissions in docker image
if: matrix.cfg.skip == false
- name: Run debug commands - post
run: |
sudo chown docker:docker /github/home /home/docker /project -R
- name: Setup git config
cd /
echo "--- Disk available ----"
df -h
- name: Fix permissions in docker image
if: matrix.cfg.skip == false
run: |
git config --global user.email "[email protected]"
git config --global user.name "Circle CI BOT"
git config --global push.default simple
sudo chown -R docker:docker /github/home /home/docker /project
- name: "Fetch code"
if: matrix.cfg.skip == false
run: |
run: |
cd /project
if [[ $GITHUB_REF_TYPE == "tag" ]]; then
export BRANCH="master"
Expand Down Expand Up @@ -91,6 +93,8 @@ jobs:
- name: "Build"
if: matrix.cfg.skip == false
run: |
echo "----- Space available -----"
df -h
echo "----- I am: $(id) -----"
cd ${PROJECT_DIR}/release/${SDK}
echo "----- Files in dir: $(pwd) -----"
Expand Down Expand Up @@ -127,13 +131,9 @@ jobs:
- name: "Prepare artifacts"
if: matrix.cfg.skip == false
env:
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
run: |
export IMAGE_PATH=${PROJECT_DIR}/release/${SDK}/image/
mkdir -p "${ARTIFACTS_DIR}"
export IMAGE_PATH=${PROJECT_DIR}/release/${SDK}/image/
echo "Removing images with boot loader."
rm -rf ${IMAGE_PATH}/*cferom*
Expand Down Expand Up @@ -162,15 +162,15 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: release-${{ matrix.cfg.model }}-${{ matrix.cfg.ui }}
path: ${{ github.workspace }}/artifacts
path: "/project/artifacts"
release-job:
name: Publish
needs: build-job
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/')
steps:
- name: Download packages
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Get release version
run: |
echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
Expand Down

0 comments on commit 3e02c30

Please sign in to comment.