mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-01 12:48:08 +09:00
Move Docker file and add automated Docker builds (#1916)
* Rework reusable workflows to use composite actions (#1918) * Update FOSSBilling/.workflows digest to 5c7b960 * Update dependency apexcharts to v3.44.2 * Update CKEditor to v39.3.0 (minor) (#1931) Update CKEditor to v39.3.0 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency core-js to v3.34.0 (#1932) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency cypress to v13.6.1 * Update dependency flag-icons to v7.0.3 * Update dependency phpunit/phpunit to v10.5.2 * Bump lcharette/webpack-encore-twig to v1.2 (#1933) Bump lcharette/webpack-encore-twig Bump lcharette/webpack-encore-twig to ^1.2 and remove symfony/webpack-encore-bundle override as now fixed upstream. * Move Dockerfile from Docker repo * Add Docker preview build and push to CI * Add workflow to build and tag Docker builds on release * Update workflow to build and tag Docker builds on release --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
c3c79ff6d1
commit
2a14679d2e
6 files changed
+101
-3
No files matched your search
@@ -111,3 +111,20 @@ jobs:
|
||||
name: 'FOSSBilling Preview'
|
||||
path: './src/*'
|
||||
retention-days: 14
|
||||
|
||||
deploy-preview-docker:
|
||||
name: 'Build and Push Preview to Docker Hub'
|
||||
permissions:
|
||||
contents: read
|
||||
needs: [ preview-build ]
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: FOSSBilling/.workflows/.github/workflows/docker-build-push.yml@fd299987b1bf7ea82885ca0642a25d8546cc3226
|
||||
secrets:
|
||||
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
with:
|
||||
download-artifact: 'preview-build'
|
||||
platforms: '["linux/amd64", "linux/arm64"]'
|
||||
repository-name: 'fossbilling/fossbilling'
|
||||
tag-latest: 'false'
|
||||
tag-raw: 'preview'
|
||||
@@ -0,0 +1,58 @@
|
||||
name: Upload Release to Docker Hub
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
release-build:
|
||||
name: 'Create Release (${{ github.ref_name }})'
|
||||
permissions:
|
||||
contents: read
|
||||
uses: ./.github/workflows/release-build.yml
|
||||
with:
|
||||
artifact-name: 'release-build'
|
||||
preview: false
|
||||
|
||||
# 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
|
||||
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@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
|
||||
needs: [ release-build, check-latest ]
|
||||
uses: FOSSBilling/.workflows/.github/workflows/docker-build-push.yml@fd299987b1bf7ea82885ca0642a25d8546cc3226
|
||||
secrets:
|
||||
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
with:
|
||||
download-artifact: 'release-build'
|
||||
platforms: '["linux/amd64", "linux/arm64"]'
|
||||
repository-name: 'fossbilling/fossbilling'
|
||||
tag-latest: ${{ needs.check-latest.outputs.is_latest }}
|
||||
Reference in new issue
Block a user