Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to undock #36

Merged
merged 5 commits into from
Apr 18, 2023
Merged
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
94 changes: 19 additions & 75 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,97 +6,41 @@ on:
- published

jobs:
osx:
runs-on: macos-latest
release:
runs-on: ubuntu-latest
steps:
- name: Get tag name
- name: tag name
id: tagName
run: |
TAG=${GITHUB_REF##*/}
echo ::set-output name=tag::${TAG}

- name: build
run: |
set -x

brew install oras

# homebrew doesn't use v, just a number triplet
_version=${{ steps.tagName.outputs.tag }}
_version=${_version:1}
echo "tag=$TAG" >> $GITHUB_OUTPUT

echo ref ${GITHUB_REF}
echo ref_name ${GITHUB_REF_NAME}

# AMD64 is not supported beyond 12.6
oras pull ghcr.io/homebrew/core/envoy:${_version} --platform "darwin/amd64:macOS 12.6"
tar --extract \
--file envoy--${_version}.monterey.bottle.tar.gz \
--directory . \
--strip-components=3 \
envoy/${_version}/bin/envoy
mv -f envoy envoy-darwin-amd64

oras pull ghcr.io/homebrew/core/envoy:${_version} --platform "darwin/arm64:macOS 13"
tar --extract \
--file envoy--${_version}.arm64_ventura.bottle.tar.gz \
--directory . \
--strip-components=3 \
envoy/${_version}/bin/envoy
mv -f envoy envoy-darwin-arm64

shasum -a 256 envoy-darwin-amd64 > envoy-darwin-amd64.sha256
shasum -a 256 envoy-darwin-arm64 > envoy-darwin-arm64.sha256

- name: Upload artifacts to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release -R pomerium/envoy-binaries upload ${{ steps.tagName.outputs.tag }} envoy-darwin-*

linux:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: 1.18.x
fetch-depth: 0

# We need api 1.41 to override platform
- name: Install docker stable
uses: docker-practice/actions-setup-docker@5d9a5f65f510c01ec5f0bd81d5c95768b1ec032a
with:
docker_channel: stable
docker_version: 20.10
- name: Set up QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18

- name: Set up Docker
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c

- name: Get tag name
id: tagName
- name: Install homebrew
run: |
TAG=${GITHUB_REF##*/}
echo ::set-output name=tag::${TAG}

- name: Run fetchenvoy
working-directory: fetchenvoy
run: |
go run . ${{steps.tagName.outputs.tag}}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install oras

- name: shasum
working-directory: fetchenvoy
- name: fetch envoy
run: |
shasum -a 256 envoy-linux-amd64 > envoy-linux-amd64.sha256
shasum -a 256 envoy-linux-arm64 > envoy-linux-arm64.sha256
./scripts/fetch-envoy ${{ steps.tagName.outputs.tag }} darwin amd64
./scripts/fetch-envoy ${{ steps.tagName.outputs.tag }} darwin arm64
./scripts/fetch-envoy ${{ steps.tagName.outputs.tag }} linux amd64
./scripts/fetch-envoy ${{ steps.tagName.outputs.tag }} linux arm64

- name: Upload artifacts to release
working-directory: fetchenvoy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.tagName.outputs.tag }} envoy-*
gh release upload ${{ steps.tagName.outputs.tag }} bin/envoy-* --clobber
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin
23 changes: 0 additions & 23 deletions fetchenvoy/go.mod

This file was deleted.

Loading