Skip to content

Commit

Permalink
chore(ci): Convenience Tags (#2)
Browse files Browse the repository at this point in the history
* chore(ci): Convenience Tags

* chore(ci): build on PRs
  • Loading branch information
m2Giles committed Jun 30, 2024
1 parent d3ceede commit 31fa2fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
schedule:
- cron: "45 2 * * *" # 0245 UTC everyday
workflow_dispatch:
pull_request:
branches:
- main

env:
IMAGE_NAME: fsync
Expand Down Expand Up @@ -67,11 +70,15 @@ jobs:
shell: bash
run: |
tag="${{ env.kernel_major_minor_patch }}.fsync.fc${{ matrix.fedora_version }}.x86_64"
short_tag=$(echo ${{ env.kernel_major_minor_patch }} | cut -d "-" -f 1)
COMMIT_TAGS=()
COMMIT_TAGS+=("pr-${{ github.event_number }}-${tag}")
COMMIT_TAGS+=("${GITHUB_SHA::7}-${tag}")
BUILD_TAG=(${tag})
BUILD_TAGS=()
BUILD_TAGS+=(${tag})
BUILD_TAGS+=(${short_tag})
BUILD_TAGS+=("latest")
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "Generated the following commit tags: "
for TAG in "${COMMIT_TAGS[@]}"; do
Expand All @@ -80,7 +87,7 @@ jobs:
alias_tags=("${COMMIT_TAGS[@]}")
else
alias_tags=("${BUILD_TAG[@]}")
alias_tags=("${BUILD_TAGS[@]}")
fi
echo "Generated the following build tags: "
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# fsync

[![Cache Fsync](https://github.com/ublue-os/fsync/actions/workflows/reusable-build.yml/badge.svg)](https://github.com/ublue-os/fsync/actions/workflows/reusable-build.yml)

A caching layer for the fsync kernel from sentry/kernel-fsync

0 comments on commit 31fa2fa

Please sign in to comment.