From a0404c82a30630f954c4f06215d77b77e44c3b7b Mon Sep 17 00:00:00 2001 From: Erica Pescio Date: Thu, 5 Sep 2024 15:51:38 +0200 Subject: [PATCH] ci:fixes to all workflows --- .github/workflows/appinspect.yml | 3 +-- .github/workflows/build.yml | 2 ++ .github/workflows/manual-release.yml | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/appinspect.yml b/.github/workflows/appinspect.yml index 9af4b49..69f9fae 100644 --- a/.github/workflows/appinspect.yml +++ b/.github/workflows/appinspect.yml @@ -58,7 +58,6 @@ jobs: mkdir -p build app_package=$(ls -1 *gz | xargs basename) mv ${app_package} build/ - ls -la build/ - name: Run AppInspect uses: splunk/appinspect-api-action@v3.0 @@ -66,4 +65,4 @@ jobs: username: ${{ secrets.SPLUNKBASE_USERNAME }} password: ${{ secrets.SPLUNKBASE_PASSWORD }} app_path: build/ - includedTags: "cloud,self-service" \ No newline at end of file + includedTags: "cloud" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7539269..ce35024 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,8 @@ jobs: - name: Bundle App Source run: | + sed -i '/^!/d' README.md + cp README.md packages/splunk-*/ mkdir -p build tar -C packages -zcvf build/${{ steps.app.outputs.name }}-${{ steps.app.outputs.version }}.tgz ${{ steps.app.outputs.name }}/ diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 16b5c4f..bd06171 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -30,13 +30,14 @@ jobs: if: contains(['major', 'minor', 'patch'], ${{ github.event.inputs.bumpPart }}) steps: - name: Checkout source - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get app info id: appinfo run: | - APP_NAME=$(cat app.manifest | jq -r '.info.id.name' | tr _ - ) + APP_NAME=$(cat splunk-*/app.manifest | jq -r '.info.id.name' | tr _ - ) echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT + working-directory: packages/ - name: Bump version and push tag id: bumpversion @@ -62,7 +63,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ needs.tag-version.outputs.new_sha }} fetch-depth: 0 @@ -70,17 +71,18 @@ jobs: - name: Excluding images from README run: | sed -i '/^!/d' README.md + cp README.md packages/splunk-*/ - name: Bundle app source run: | mkdir dist - tar -zcvf dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz --exclude='.[^/]*' --exclude=./dist . + tar -C packages -zcvf dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz ${{ needs.tag-version.outputs.app_name }}/ - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: app_tgz - path: dist/${{ needs.tag-version.outputs.app_name }}_v${{ needs.tag-version.outputs.version }}.tgz + path: dist/* release: name: Create Release @@ -90,7 +92,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Fetch all tags run: | @@ -127,7 +129,7 @@ jobs: prerelease: false - name: Download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: app_tgz