diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 962ee8a..c59144f 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -4,6 +4,9 @@ on: schedule: - cron: "45 2 * * *" # 0245 UTC everyday workflow_dispatch: + pull_request: + branches: + - main env: IMAGE_NAME: fsync @@ -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 @@ -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: " diff --git a/README.md b/README.md index 759b35b..b8bfd81 100644 --- a/README.md +++ b/README.md @@ -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