-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: change workflow to incorporate in-repo manifests
- Loading branch information
Showing
1 changed file
with
58 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,7 +210,7 @@ jobs: | |
- name: Pull Manifest | ||
run: | | ||
set -e | ||
wget -P "${{ steps.init.outputs.manifest-path }}" "http://archive.regolith-desktop.com/manifests/${{ steps.init.outputs.distro }}/${{ steps.init.outputs.codename }}/${{ steps.init.outputs.suite }}-${{ steps.init.outputs.component }}/${{ steps.init.outputs.arch }}/manifest.txt" || true | ||
cp "${{ steps.init.outputs.manifest-path }}/${{ steps.init.outputs.distro }}/${{ steps.init.outputs.codename }}/${{ steps.init.outputs.suite }}-${{ steps.init.outputs.component }}/manifest.txt" ${{ steps.init.outputs.manifest-path }} || true | ||
echo "Current manifest:" | ||
cat ${{ steps.init.outputs.manifest-path }}/manifest.txt || true | ||
|
@@ -281,6 +281,8 @@ jobs: | |
exit 1 | ||
fi | ||
mv ${{ steps.init.outputs.manifest-path }}/manifest.txt ${{ steps.init.outputs.manifest-path }}/${{ steps.init.outputs.distro }}_${{ steps.init.outputs.codename }}_${{ steps.init.outputs.suite }}-${{ steps.init.outputs.component }}_manifest.txt | ||
cat ${{ steps.init.outputs.changelogs-path }}/CHANGELOG_${{ steps.init.outputs.target }}.raw.txt | grep ^CHLOG: | cut -c 7- > ${{ steps.init.outputs.changelogs-path }}/CHANGELOG_${{ steps.init.outputs.target }}.txt | ||
cat ${{ steps.init.outputs.changelogs-path }}/CHANGELOG_${{ steps.init.outputs.target }}.raw.txt | grep ^SRCLOG: | cut -c 8- > ${{ steps.init.outputs.changelogs-path }}/SOURCELOG_${{ steps.init.outputs.target }}.txt | ||
|
@@ -309,7 +311,6 @@ jobs: | |
done | ||
rsync --ignore-missing-args ${{ steps.init.outputs.changelogs-path }}/SOURCELOG_${{ steps.init.outputs.target }}.txt root@${{ secrets.KAMATERA_HOSTNAME2 }}:/opt/archives/workspace/ | ||
rsync --mkpath ${{ steps.init.outputs.manifest-path }}/manifest.txt root@${{ secrets.KAMATERA_HOSTNAME2 }}:/opt/archives/manifests/${{ steps.init.outputs.distro }}/${{ steps.init.outputs.codename }}/${{ steps.init.outputs.suite }}-${{ steps.init.outputs.component }}/${{ steps.init.outputs.arch }}/ | ||
- name: Log Build Output | ||
if: steps.changes.outputs.changed == 1 | ||
|
@@ -318,13 +319,63 @@ jobs: | |
echo "package-publish-path:" | ||
find ${{ steps.init.outputs.package-publish-path }} | ||
- name: Upload Artifacts | ||
- name: Upload Manifests | ||
uses: actions/upload-artifact@v4 | ||
if: steps.changes.outputs.changed == 1 | ||
with: | ||
name: MANIFESTS_${{ steps.init.outputs.target }} | ||
path: "${{ steps.init.outputs.manifest-path }}/*_manifest.txt" | ||
|
||
- name: Upload Changelogs | ||
uses: actions/upload-artifact@v4 | ||
if: steps.changes.outputs.changed == 1 | ||
with: | ||
name: CHANGELOG_${{ steps.init.outputs.target }} | ||
path: ${{ steps.init.outputs.changelogs-path }}/*${{ steps.init.outputs.target }}.txt | ||
|
||
# update manifests | ||
manifests: | ||
runs-on: ubuntu-24.04 | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: manifests | ||
pattern: MANIFESTS_* | ||
merge-multiple: true | ||
|
||
- name: Check Manifests | ||
run: | | ||
for file in manifests/*_manifest.txt; do | ||
if [ ! -f "$$file" ]; then | ||
continue | ||
fi | ||
filename="$(basename $file)" | ||
distro="$(echo $filename | cut -d"_" -f1)" | ||
codename="$(echo $filename | cut -d"_" -f2)" | ||
suite="$(echo $filename | cut -d"_" -f3)" | ||
name="$(echo $filename | cut -d"_" -f4)" | ||
mkdir -p manifests/$distro/$codename/$suite/ | ||
mv $file manifests/$distro/$codename/$suite/$name | ||
done | ||
- name: Push Manifest Changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN }} | ||
with: | ||
file_pattern: "*" | ||
commit_message: "chore: update ${{ inputs.stage }} manifest for all packages" | ||
commit_user_name: regolith-bot | ||
commit_user_email: [email protected] | ||
commit_author: "regolith-bot <[email protected]>" | ||
|
||
# calculate changelogs | ||
changelogs: | ||
runs-on: ubuntu-24.04 | ||
|
@@ -360,7 +411,7 @@ jobs: | |
# rebuild sources | ||
source: | ||
needs: changelogs | ||
needs: [manifests, changelogs] | ||
if: ${{ !failure() && !cancelled() && needs.changelogs.outputs.source-changed != 0 }} | ||
uses: ./.github/workflows/rebuild-sources.yml | ||
with: | ||
|
@@ -370,7 +421,7 @@ jobs: | |
|
||
# publish archives | ||
publish: | ||
needs: [changelogs, source] | ||
needs: [manifests, changelogs, source] | ||
if: ${{ !failure() && !cancelled() && needs.changelogs.outputs.package-changed != 0 }} | ||
uses: ./.github/workflows/publish-packages.yml | ||
with: | ||
|
@@ -380,7 +431,7 @@ jobs: | |
# create a release with changlogs | ||
release: | ||
runs-on: ubuntu-24.04 | ||
needs: [changelogs, publish] | ||
needs: [manifests, changelogs, publish] | ||
if: ${{ !failure() && !cancelled() && needs.changelogs.outputs.package-changed != 0 }} | ||
steps: | ||
- name: Download Artifacts | ||
|
@@ -407,7 +458,7 @@ jobs: | |
# run the tests | ||
test: | ||
needs: [changelogs, release] | ||
needs: [manifests, changelogs, release] | ||
if: ${{ !failure() && !cancelled() }} | ||
uses: ./.github/workflows/test-desktop-installable2.yml | ||
with: | ||
|