Skip to content

Commit

Permalink
feat: extract binary actions: temporary upload to artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
junkurihara committed Oct 11, 2023
1 parent a6893cc commit 099eca0
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Extract executable binary and upload artifacts
on:
push:
# workflow_run:
Expand Down Expand Up @@ -42,15 +42,28 @@ jobs:
tags-suffix: "-s2n"

steps:
- run: echo 'The relese triggering workflows passed'
- run: "echo 'The relese triggering workflows passed'"

- name: "set env"
run: |
if [ ${{ matrix.platform }} = "linux/amd64" ];then PLATFORM_MAP="x86_64";else PLATFORM_MAP="aarch64";fi
echo "PLATFORM_MAP=${PLATFORM_MAP}" >> $GITHUB_ENV
echo "TARGET_NAME=rpxy-nightly-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}" >> $GITHUB_ENV
- name: "docker pull and extract binary from docker image"
# if: ${{ github.ref_name == 'develop' }}
run: |
CONTAINER_ID=`docker create --platform=${{ matrix.platform }} ghcr.io/junkurihara/rust-rpxy:nightly${{ matrix.tags-suffix }}`
if [ ${{ matrix.platform }} = "linux/amd64" ];then PLATFORM_MAP="x86_64";else PLATFORM_MAP="aarch64";fi
docker cp ${CONTAINER_ID}:/rpxy/bin/rpxy /tmp/rpxy-nightly-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}-${{ matrix.tags-suffix }}
ls /tmp
docker cp ${CONTAINER_ID}:/rpxy/bin/rpxy /tmp/${TARGET_NAME}
cd /tmp
tar zcvf ${TARGET_NAME}.tar.gz ${TARGET_NAME}
- name: "upload artifacts"
# if: ${{ github.ref_name == 'develop' }}
uses: actions/upload-artifact@v3
with:
name: "rpxy bin"
path: "/tmp/rpxy-*.tar.gz"

# on-failure:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 099eca0

Please sign in to comment.