Merge pull request #1 from mnb3000/forge #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker publish | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
release-on-push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- id: release | ||
name: Release | ||
uses: rymndhng/release-on-push-action@master | ||
with: | ||
bump_version_scheme: patch | ||
use_github_release_notes: true | ||
- name: Create changelog | ||
uses: TriPSs/conventional-changelog-action@v5 | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
skip-tag: "true" | ||
skip-bump: "true" | ||
release-count: 20 | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: release-on-push | ||
steps: | ||
- name: Maximize build space | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
docker-images: false | ||
- name: Clean docker image cache | ||
run: | | ||
docker image rm -f \ | ||
$( \ | ||
docker image -a | \ | ||
grep -v "buildkit" | \ | ||
grep -v "ubuntu.*22\.04" | \ | ||
awk 'NR>1 {print $3}' | ||
) | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: mnb3000/a1111-forge-svd-docker | ||
flavor: | | ||
latest=auto | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=ref,event=branch | ||
- name: Build and push | ||
uses: docker/bake-action@v4 | ||
with: | ||
files: | | ||
./docker-bake.hcl | ||
${{ steps.meta.outputs.bake-file }} | ||
targets: default | ||
push: true | ||
env: | ||
RELEASE: ${{jobs.release-on-push.steps.release.outputs.tag_name}} | ||
Check failure on line 88 in .github/workflows/docker-publish.yml GitHub Actions / Docker publishInvalid workflow file
|