Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strip_sha=${sha:0:7}
echo "SHORT_SHA=${strip_sha}" >> $GITHUB_ENV
- uses: actions/cache@v4
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
with:
path: ${{ github.workspace }}/build-${{ matrix.arch }}
key: key-${{ env.SHORT_SHA }}-${{ github.run_id }}-${{ matrix.arch }}
Expand All @@ -61,7 +61,7 @@ jobs:
get_version: "true"
- name: Get changes for manifest
id: manifest-settings
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
run: |
if [ ${{github.ref_type}} == tag ]; then
echo "version_value=${{ steps.meta.outputs.version }}" >> $GITHUB_OUTPUT
Expand All @@ -71,7 +71,7 @@ jobs:
echo "append_sha='true'" >> $GITHUB_OUTPUT
fi
- name: Update manifest file
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
uses: ./.github/actions/update-acap-manifest-action
with:
manifest_file: ./app/manifest.json
Expand All @@ -87,22 +87,22 @@ jobs:
outputs: "type=local,dest=build"
- name: Get name of EAP-file
id: get_eap_file_name
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
run: |
export EAP_FILE=$(find build -type f -name "*.eap" -printf "%f\n")
delimiter="$(openssl rand -hex 8)"
echo "EAP_FILE<<${delimiter}" >> ${GITHUB_ENV}
echo "${EAP_FILE}" >> ${GITHUB_ENV}
echo "${delimiter}" >> ${GITHUB_ENV}
- name: Add sha to EAP-file name
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
run: |
eap_file_w_sha=$(echo $"${{ env.EAP_FILE }}" | sed 's/\.eap/_${{ env.SHORT_SHA }}.eap/')
echo "EAP_FILE_W_SHA=${eap_file_w_sha}" >> $GITHUB_ENV
cp build/${{ env.EAP_FILE }} build/$eap_file_w_sha
- name: Save full file name
id: save_full_file_name
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
run: |
echo "SHORT_SHA=${{ env.SHORT_SHA }}" >> $GITHUB_OUTPUT
if [ ${{ matrix.arch }} = armv7hf ]
Expand All @@ -115,7 +115,7 @@ jobs:
echo "::error::Non valid architecture '${{ matrix.arch }}' encountered"
fi
- name: Move EAP-file to cache location
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
run: |
mkdir -p ${{ github.workspace }}/build-${{ matrix.arch }}
#rm -f ${{ github.workspace }}/build-${{ matrix.arch }}/${{ env.EAP_FILE_W_SHA }}
Expand All @@ -124,7 +124,7 @@ jobs:
# Sign the eap-file from the build
sign-eap:
runs-on: ubuntu-latest
if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
#if: ${{ (github.ref_type == 'tag') || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
needs: build
permissions:
contents: write
Expand Down Expand Up @@ -161,6 +161,11 @@ jobs:
run: |
mkdir -p build
mv ${{ github.workspace }}/build-${{ matrix.arch }}/${{ env.EAP_FILE }} build/.
- name: Upload unsigned artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.EAP_FILE }}
path: build/${{ env.EAP_FILE }}
- name: Refactor naming of EAP-file for signed output
run: |
signed_output=$(echo "${{ env.EAP_FILE }}" | sed 's/\.eap/_signed.eap/')
Expand All @@ -172,7 +177,7 @@ jobs:
-H 'Authorization: Bearer ${{secrets.ACAP_PORTAL_SIGNING_BEARER_TOKEN}}' \
'${{ vars.ACAP_PORTAL_URL }}/${{secrets.ACAP_PORTAL_SIGNING_ID}}/sign/binary' \
-F uploadedFile=@"${{ env.EAP_FILE }}" --output ${{ env.SIGNED_EAP_FILE }} \
-w "%{http_code}\n" -o /dev/null --http1.1)
-w "%{http_code}\n" -v -o /dev/null --http1.1)
echo "HTTP_RESPONSE=$RESPONSE" >> $GITHUB_ENV
- name: Check that acap has been signed
run: |
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ RUN <<EOF
acap-build . \
-a docker \
-a dockerd \
-a docker-compose \
-a docker-init \
-a docker-proxy \
-a ps \
Expand Down
Loading