-
Notifications
You must be signed in to change notification settings - Fork 135
1 #708
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
base: main
Are you sure you want to change the base?
1 #708
Changes from 1 commit
fcb71f8
e8da57f
59666d9
7868e6c
abceb04
d7a8177
87371d5
394b2aa
7af2920
295ec55
08b1c4b
92e692f
76f94f1
f6b0c2d
5c8437d
f207b62
1e1576a
3f0c134
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: Build Flatpak Snapshot | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - flatpak-snapshot | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| # 1. Checkout repo | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # 2. Set up Flatpak | ||
| - name: Install Flatpak | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install -y flatpak flatpak-builder git wget xz-utils | ||
|
|
||
| # 3. Install GNOME SDK runtime | ||
| - name: Install GNOME SDK | ||
| run: | | ||
| flatpak install --noninteractive flathub org.gnome.Sdk//46 org.gnome.Platform//46 | ||
|
|
||
| # 4. Determine snapshot version from Git | ||
| - name: Set snapshot version | ||
| id: vars | ||
| run: | | ||
| SHORT_HASH=$(git rev-parse --short HEAD) | ||
| VERSION="0.9.3~git${SHORT_HASH}" | ||
| echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
| echo "Snapshot version set to ${VERSION}" | ||
|
|
||
| # 5. Build Flatpak | ||
| - name: Build Flatpak | ||
| run: | | ||
| flatpak-builder --force-clean build-dir iptux.flatpak.yaml | ||
|
||
|
|
||
| # 6. Export repository to repo/ | ||
| - name: Export Flatpak repo | ||
| run: | | ||
| flatpak build-export repo build-dir --collection-id=io.github.iptux | ||
|
|
||
| # 7. Commit & push to gh-pages | ||
| - name: Deploy to GitHub Pages | ||
| uses: peaceiris/actions-gh-pages@v4 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: repo | ||
| publish_branch: gh-pages | ||
| user_name: "GitHub Actions" | ||
| user_email: "[email protected]" | ||
| commit_message: "Update Flatpak snapshot: ${{ env.VERSION }}" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 suggestion (security): Consider pinning GitHub Actions to specific commit SHAs for supply-chain security
Floating tags like
@v4can change over time and introduce supply-chain risk. Please pinactions/checkout(and other third-party actions in this workflow) to a specific commit SHA, with an inline comment noting the version for traceability.Suggested implementation:
If there are other third-party actions used elsewhere in this workflow file (or in other workflow files), they should also be updated to use commit SHA pins with inline comments indicating the tagged version (e.g.,
# vX.Y.Z) for consistency and supply-chain security.