Skip to content

Commit 8940a2b

Browse files
committed
ci: find profile properly, and remove on push
1 parent 6285e5f commit 8940a2b

1 file changed

Lines changed: 3 additions & 37 deletions

File tree

.github/workflows/build-preview.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Build and Release Preview
22

33
on:
4-
push:
5-
# branches:
6-
# - main
7-
# pull_request:
8-
# branches:
9-
# - main
104
workflow_dispatch:
115

126
jobs:
@@ -35,7 +29,7 @@ jobs:
3529
echo "Error: profiledef.sh not found"
3630
exit 1
3731
fi
38-
source profiledef.sh
32+
source ./profiledef.sh
3933
echo "Building ISO: ${iso_name} version ${iso_version}"
4034
4135
- name: Build ISO
@@ -53,7 +47,7 @@ jobs:
5347
ISO_SHA256=$(sha256sum "$ISO_PATH" | cut -d' ' -f1)
5448
5549
# Get version from profiledef.sh (format: yyyy.mm)
56-
source profiledef.sh
50+
source $GITHUB_WORKSPACE/profiledef.sh
5751
RELEASE_VERSION="${iso_version}"
5852
RELEASE_TAG="alg-xfce-${RELEASE_VERSION}"
5953
@@ -114,7 +108,7 @@ jobs:
114108
cat /tmp/release-notes.md
115109
116110
- name: Create release
117-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
111+
if: github.event_name == 'workflow_dispatch'
118112
uses: softprops/action-gh-release@v1
119113
with:
120114
tag_name: ${{ steps.iso_info.outputs.release_tag }}
@@ -127,31 +121,3 @@ jobs:
127121
/tmp/archiso-out/SHA256SUMS
128122
env:
129123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130-
131-
- name: Comment on PR with build info
132-
if: github.event_name == 'pull_request'
133-
uses: actions/github-script@v7
134-
with:
135-
script: |
136-
const iso_name = '${{ steps.iso_info.outputs.iso_name }}';
137-
const iso_size = '${{ steps.iso_info.outputs.iso_size }}';
138-
const iso_sha256 = '${{ steps.iso_info.outputs.iso_sha256 }}';
139-
140-
const comment = `## Build Preview Ready
141-
142-
The ISO has been built successfully!
143-
144-
**ISO Details:**
145-
- Filename: \`${iso_name}\`
146-
- Size: ${iso_size}
147-
- SHA256: \`${iso_sha256}\`
148-
149-
You can download the artifact from the [Actions tab](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
150-
`;
151-
152-
github.rest.issues.createComment({
153-
issue_number: context.issue.number,
154-
owner: context.repo.owner,
155-
repo: context.repo.repo,
156-
body: comment
157-
});

0 commit comments

Comments
 (0)