forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.78 KB
/
build.yaml
File metadata and controls
57 lines (45 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy Images to GHCR
on:
pull_request:
types: [labeled]
jobs:
cancel_outstanding:
name: Detect and cancel outstanding runs of this workflow
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Cancel Previous Runs
if: ${{ (github.event.label.name == 'release') && !contains(github.event.pull_request.labels.*.name, 'skip-cancel') }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
push-store-image:
permissions: write-all
runs-on: ubuntu-latest
if: ${{ (github.event.label.name == 'release' ) && !contains(github.event.pull_request.labels.*.name, 'skip-cancel') }}
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: envvars
run: |
echo "RELEASE=$(cat build/vars/BUILD_TAG)" >> $GITHUB_ENV
echo "REGISTRY=$(cat build/vars/REGISTRY)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: free space
run: |
bash .github/workflows/freespace.sh
##https://github.com/orgs/community/discussions/25678
- name: 'free up space'
run: |
rm -rf /opt/hostedtoolcache
- name: 'Build sd-web-ui image'
run: |
cd build && \
RELEASE=${{ env.RELEASE }} \
REGISTRY=${{ env.REGISTRY }} \
docker buildx bake sd-web-ui -f docker-bake.hcl --push