mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 20:27:07 +09:00
Disable Docker GHA cache in preview/release workflows Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/07ce9c6d-cb2b-4bb5-9517-3aabe5276051 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
name: Upload Release to Docker Hub
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-dockerhub
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
# Latest release is identified by branch/tag SemVer,
|
|
# not the 'Set as the latest release' GitHub option.
|
|
check-latest:
|
|
name: 'Check if Release is Latest'
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
outputs:
|
|
is_latest: ${{ steps.compare-latest.outputs.is_latest }}
|
|
steps:
|
|
- name: 'Get Latest Release Version Tag'
|
|
id: get-latest
|
|
uses: pozetroninc/github-action-get-latest-release@53d33d213ee71c72360e3c829caf7cee94ec21e2 # master
|
|
with:
|
|
excludes: 'prerelease,draft'
|
|
repository: 'FOSSBilling/FOSSBilling'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: 'Check if Current Release Version is Latest'
|
|
id: compare-latest
|
|
run: |
|
|
if [ "${{ github.ref_name }}" = "${{ steps.get-latest.outputs.release }}" ]; then
|
|
echo "is_latest=true" >> "${GITHUB_OUTPUT}"
|
|
else
|
|
echo "is_latest=false" >> "${GITHUB_OUTPUT}"
|
|
fi
|
|
|
|
deploy-release-docker:
|
|
name: 'Build and Push Release to Docker Hub'
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
needs: [ check-latest ]
|
|
uses: docker/github-builder/.github/workflows/build.yml@c2782c55efa56a01b9c30021db8f5ec3993228a3 # v1.8.0
|
|
secrets:
|
|
registry-auths: |
|
|
- registry: docker.io
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
with:
|
|
output: image
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
cache: false
|
|
sbom: true
|
|
set-meta-labels: true
|
|
set-meta-annotations: true
|
|
meta-images: fossbilling/fossbilling
|
|
meta-flavor: |
|
|
latest=false
|
|
meta-tags: |
|
|
type=semver,pattern={{version}}
|
|
type=raw,value=latest,enable=${{ needs.check-latest.outputs.is_latest == 'true' }}
|
|
build-args: |
|
|
FOSSBILLING_VERSION=${{ github.ref_name }}
|
|
SENTRY_DSN=${{ vars.SENTRY_DSN }}
|