diff --git a/.github/workflows/node.yaml b/.github/workflows/node.yaml index 1a91e9e..af89050 100644 --- a/.github/workflows/node.yaml +++ b/.github/workflows/node.yaml @@ -380,11 +380,11 @@ jobs: runs-on: ubuntu-latest name: build image - # only run for main - if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} + # # only run for main + # if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} - needs: - - Linux-arm64 + # needs: + # - Linux-arm64 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -425,50 +425,55 @@ jobs: path: /tmp/packer_cache key: ${{ steps.install-packer.outputs.CACHE_KEY }} - - name: build image - run: | - echo "BUILD_IS_TAG=${BUILD_IS_TAG}" - if [[ "$BUILD_IS_TAG" == "true" ]]; then - export BUILD_BRANCH=stable - export BUILD_VERSION="${{ steps.filenames.outputs.shortversion }}" - else - export BUILD_BRANCH=${GITHUB_REF_NAME} - export BUILD_VERSION="${{ steps.filenames.outputs.longversion }}" - fi - - cd pi-image - sudo packer init satellitepi.pkr.hcl - sudo packer build --var branch=${BUILD_BRANCH} --var "build=$BUILD_VERSION" satellitepi.pkr.hcl - env: - PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PACKER_CACHE_DIR: /tmp/packer_cache - BUILD_IS_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }} - - - name: compress image - shell: bash - run: | - cd pi-image/output-satellitepi - - sudo apt-get install -y zerofree - device="$(sudo losetup --partscan --show --find image)" - sudo zerofree "${device}p2" - sudo losetup --detach "$device" - - sudo gzip -n image - - - name: Upload build - uses: bitfocus/actions/upload-and-notify@main + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 with: - long-version: ${{ steps.filenames.outputs.longversion }} - beta-branch: main - - source-filename: ${{ steps.filenames.outputs.sourcename }} - destination-filename: ${{ steps.filenames.outputs.targetname }} - s3-host: ${{ secrets.S3_HOST }} - s3-bucket: ${{ secrets.S3_BUCKET }}/companion-satellite - s3-access-key: ${{ secrets.S3_KEY }} - s3-secret-key: ${{ secrets.S3_SECRET }} - - api-product: companion-satellite - api-target: 'linux-img' - api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }} + limit-access-to-actor: true + + # - name: build image + # run: | + # echo "BUILD_IS_TAG=${BUILD_IS_TAG}" + # if [[ "$BUILD_IS_TAG" == "true" ]]; then + # export BUILD_BRANCH=stable + # export BUILD_VERSION="${{ steps.filenames.outputs.shortversion }}" + # else + # export BUILD_BRANCH=${GITHUB_REF_NAME} + # export BUILD_VERSION="${{ steps.filenames.outputs.longversion }}" + # fi + + # cd pi-image + # sudo packer init satellitepi.pkr.hcl + # sudo packer build --var branch=${BUILD_BRANCH} --var "build=$BUILD_VERSION" satellitepi.pkr.hcl + # env: + # PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PACKER_CACHE_DIR: /tmp/packer_cache + # BUILD_IS_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }} + + # - name: compress image + # shell: bash + # run: | + # cd pi-image/output-satellitepi + + # sudo apt-get install -y zerofree + # device="$(sudo losetup --partscan --show --find image)" + # sudo zerofree "${device}p2" + # sudo losetup --detach "$device" + + # sudo gzip -n image + + # - name: Upload build + # uses: bitfocus/actions/upload-and-notify@main + # with: + # long-version: ${{ steps.filenames.outputs.longversion }} + # beta-branch: main + + # source-filename: ${{ steps.filenames.outputs.sourcename }} + # destination-filename: ${{ steps.filenames.outputs.targetname }} + # s3-host: ${{ secrets.S3_HOST }} + # s3-bucket: ${{ secrets.S3_BUCKET }}/companion-satellite + # s3-access-key: ${{ secrets.S3_KEY }} + # s3-secret-key: ${{ secrets.S3_SECRET }} + + # api-product: companion-satellite + # api-target: 'linux-img' + # api-secret: ${{ secrets.BITFOCUS_API_PROJECT_SECRET }}