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

fix(ci): separate rpm/bin/bin-static/deb packages before publication, rename bin-static #2527

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
7 changes: 6 additions & 1 deletion .github/workflows/reusable_build_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,15 @@ jobs:
run: |
cd build
make -j6 package

- name: Rename static package
run: |
cd build
mv falco-${{ needs.fetch-version.outputs.version }}-x86_64.tar.gz falco-${{ needs.fetch-version.outputs.version }}-static-x86_64.tar.gz

- name: Upload Falco static package
uses: actions/upload-artifact@v3
with:
name: falco-${{ needs.fetch-version.outputs.version }}-static-x86_64.tar.gz
path: |
${{ github.workspace }}/build/falco-*.tar.gz
${{ github.workspace }}/build/falco-${{ needs.fetch-version.outputs.version }}-static-x86_64.tar.gz
28 changes: 14 additions & 14 deletions .github/workflows/reusable_publish_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ jobs:
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-x86_64.rpm
path: /tmp
path: /tmp/falco-rpm
Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to the documentation ( https://github.com/actions/download-artifact#compatibility-between-v1-and-v2v3 ) the directory should be created if it doesn't exist.


- name: Download RPM aarch64
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-aarch64.rpm
path: /tmp
path: /tmp/falco-rpm

- name: Download binary x86_64
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-x86_64.tar.gz
path: /tmp
path: /tmp/falco-bin

- name: Download binary aarch64
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-aarch64.tar.gz
path: /tmp
path: /tmp/falco-bin

- name: Download static binary x86_64
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-static-x86_64.tar.gz
path: /tmp
path: /tmp/falco-bin-static

- name: Import gpg key
env:
Expand All @@ -91,21 +91,21 @@ jobs:
expect eof
EOF
chmod +x ~/sign
~/sign /tmp/falco-*.rpm
rpm --qf %{SIGPGP:pgpsig} -qp /tmp/falco-*.rpm | grep SHA256
~/sign /tmp/falco-rpm/falco-*.rpm
rpm --qf %{SIGPGP:pgpsig} -qp /tmp/falco-rpm/falco-*.rpm | grep SHA256

- name: Publish rpm
run: |
./scripts/publish-rpm -f /tmp/falco-${{ inputs.version }}-x86_64.rpm -f /tmp/falco-${{ inputs.version }}-aarch64.rpm -r rpm${{ inputs.bucket_suffix }}
./scripts/publish-rpm -f /tmp/falco-rpm/falco-${{ inputs.version }}-x86_64.rpm -f /tmp/falco-rpm/falco-${{ inputs.version }}-aarch64.rpm -r rpm${{ inputs.bucket_suffix }}

- name: Publish bin
run: |
./scripts/publish-bin -f /tmp/falco-${{ inputs.version }}-x86_64.tar.gz -r bin${{ inputs.bucket_suffix }} -a x86_64
./scripts/publish-bin -f /tmp/falco-${{ inputs.version }}-aarch64.tar.gz -r bin${{ inputs.bucket_suffix }} -a aarch64
./scripts/publish-bin -f /tmp/falco-bin/falco-${{ inputs.version }}-x86_64.tar.gz -r bin${{ inputs.bucket_suffix }} -a x86_64
./scripts/publish-bin -f /tmp/falco-bin/falco-${{ inputs.version }}-aarch64.tar.gz -r bin${{ inputs.bucket_suffix }} -a aarch64

- name: Publish static
run: |
./scripts/publish-bin -f /tmp/falco-${{ inputs.version }}-static-x86_64.tar.gz -r bin${{ inputs.bucket_suffix }} -a x86_64
./scripts/publish-bin -f /tmp/falco-bin-static/falco-${{ inputs.version }}-static-x86_64.tar.gz -r bin${{ inputs.bucket_suffix }} -a x86_64

publish-packages-deb:
runs-on: ubuntu-latest
Expand All @@ -132,13 +132,13 @@ jobs:
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-x86_64.deb
path: /tmp
path: /tmp/falco-deb

- name: Download deb aarch64
uses: actions/download-artifact@v3
with:
name: falco-${{ inputs.version }}-aarch64.deb
path: /tmp
path: /tmp/falco-deb

- name: Import gpg key
env:
Expand All @@ -147,4 +147,4 @@ jobs:

- name: Publish deb
run: |
./scripts/publish-deb -f /tmp/falco-${{ inputs.version }}-x86_64.deb -f /tmp/falco-${{ inputs.version }}-aarch64.deb -r deb${{ inputs.bucket_suffix }}
./scripts/publish-deb -f /tmp/falco-deb/falco-${{ inputs.version }}-x86_64.deb -f /tmp/falco-deb/falco-${{ inputs.version }}-aarch64.deb -r deb${{ inputs.bucket_suffix }}