fix oras pull errors #118
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: artifacts | |
on: [push, pull_request] | |
## Tests that all artifacts can be built on every push. | |
## Uploads the artifacts to the GitHub release page for tags. | |
jobs: | |
rpm: | |
runs-on: ubuntu-20.04 | |
container: registry.suse.com/bci/bci-base:15.5 | |
steps: | |
- name: setup-environment | |
run: | | |
zypper install -y libmount-devel gcc make rpm-build git sudo python3 wget | |
- name: clone | |
uses: actions/checkout@v2 | |
- name: build | |
run: | | |
set -x | |
# x86 | |
./rpm/generate-rpm.sh -s . -b rpm-build -a x86_64 | |
rpmbuild -bs --define "_topdir rpm-build" --target=x86_64 rpm-build/SPECS/uenv.spec | |
sudo rpmbuild --target=x86_64 --rebuild "$(find rpm-build/SRPMS -name '*.rpm' -type f -print -quit)" --define "_topdir $(pwd)/rpm-build" | |
find rpm-build -name '*.rpm' -type f -exec cp {} . \; | |
# aarch64 | |
sudo rm -rf ./rpm-build | |
./rpm/generate-rpm.sh -s . -b rpm-build -a aarch64 | |
rpmbuild -bs --define "_topdir rpm-build" --target=aarch64 rpm-build/SPECS/uenv.spec | |
sudo rpmbuild --target=aarch64 --rebuild "$(find rpm-build/SRPMS -name '*.rpm' -type f -print -quit)" --define "_topdir $(pwd)/rpm-build" | |
find rpm-build -name '*.rpm' -type f -exec cp {} . \; | |
- name: upload-rpm | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm | |
path: '*.rpm' | |
tag-release: | |
runs-on: ubuntu-20.04 | |
needs: rpm | |
permissions: | |
contents: write | |
steps: | |
- name: download-artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: rpm | |
- name: release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: '*.rpm' |