Skip to content

Commit

Permalink
chore: copy arm64 binaries and login dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
strophy committed Mar 15, 2022
1 parent 7e7ee99 commit f9ee704
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/make-plugin-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
Expand All @@ -27,6 +28,12 @@ jobs:
- name: Reset QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta prereqs
id: docker_meta_prereqs
uses: docker/metadata-action@v3
Expand All @@ -38,7 +45,7 @@ jobs:
flavor: |
latest=false
- name: Build and push Docker image
- name: Build and push Docker image prereqs
id: docker_build_prereqs
uses: docker/build-push-action@v2
with:
Expand All @@ -51,7 +58,7 @@ jobs:
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Docker meta
- name: Docker meta plugin
id: docker_meta_plugin
uses: docker/metadata-action@v3
with:
Expand All @@ -62,7 +69,7 @@ jobs:
flavor: |
latest=false
- name: Build and push Docker image
- name: Build and push Docker image plugin
id: docker_build_plugin
uses: docker/build-push-action@v2
with:
Expand All @@ -75,16 +82,32 @@ jobs:
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Copy binary from Docker image
- name: Copy binary from Docker image x86_64
run: |
docker cp $(docker create strophy/protoc-plugin):/github/grpc-web/javascript/net/grpc/web/generator/protoc-gen-grpc-web \
docker cp $(docker create --platform linux/amd64 strophy/protoc-plugin):/github/grpc-web/javascript/net/grpc/web/generator/protoc-gen-grpc-web \
./protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-x86_64
- name: gen sha256
- name: Copy binary from Docker image arm64
run: |
docker cp $(docker create --platform linux/arm64 strophy/protoc-plugin):/github/grpc-web/javascript/net/grpc/web/generator/protoc-gen-grpc-web \
./protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-arm64
- name: gen sha256 x86_64
run: |
openssl dgst -sha256 -r -out protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-x86_64.sha256 \
protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-x86_64
- name: verify sha256
- name: gen sha256 arm64
run: |
openssl dgst -sha256 -r -out protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-arm64.sha256 \
protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-arm64
- name: verify sha256 x86_64
run: sha256sum -c protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-x86_64.sha256

- name: verify sha256 arm64
run: sha256sum -c protoc-gen-grpc-web-${{ github.event.inputs.version_number }}-linux-arm64.sha256

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit f9ee704

Please sign in to comment.