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

Making build artifacts available on release. #222

Merged
merged 1 commit into from
Jun 30, 2023
Merged
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
24 changes: 22 additions & 2 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,40 @@ jobs:
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
submodules: recursive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! Something new I learned today!

path: src
- name: Log-in to container registry
run: |
docker login --username="$DOCKER_USERNAME" --password-stdin $DOCKER_REGISTRY <<< "$DOCKER_PASSWORD"
- name: Build artifacts
run: |
git submodule update --init --recursive
mkdir -p $GITHUB_WORKSPACE/out
docker run -t --rm \
--mount "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock" \
--mount "type=bind,source=$(git rev-parse --show-toplevel),destination=/root/src,readonly" \
--mount "type=bind,source=$GITHUB_WORKSPACE/src,destination=/root/src,readonly" \
--mount "type=bind,source=$GITHUB_WORKSPACE/out,destination=/root/out" \
--env EBPF_NET_SRC_ROOT=/root/src \
$BENV_IMAGE \
./build.sh pipeline-docker
- name: Build packages
run: |
docker run -t --rm \
--mount "type=bind,source=$GITHUB_WORKSPACE/src,destination=/root/src,readonly" \
--mount "type=bind,source=$GITHUB_WORKSPACE/out,destination=/root/out" \
--env EBPF_NET_SRC_ROOT=/root/src \
--workdir /root/out \
$BENV_IMAGE \
cpack -G 'RPM;DEB'
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: packages
path: |
out/opentelemetry-ebpf-*.rpm
out/opentelemetry-ebpf-*.deb
- name: Push to container registry
run: |
cd $GITHUB_WORKSPACE/src
source ./version.sh

git_short_hash=$(git rev-parse --short=8 HEAD)
Expand Down