Spaces:
Running
Running
imseldrith
commited on
Delete .github
Browse files
.github/workflows/build-docker.yml
DELETED
@@ -1,222 +0,0 @@
|
|
1 |
-
name: Build and Publish Docker Image
|
2 |
-
|
3 |
-
on:
|
4 |
-
workflow_dispatch:
|
5 |
-
push:
|
6 |
-
branches:
|
7 |
-
- 'main'
|
8 |
-
release:
|
9 |
-
types: [published]
|
10 |
-
|
11 |
-
jobs:
|
12 |
-
build-and-push-image:
|
13 |
-
runs-on: ubuntu-latest
|
14 |
-
|
15 |
-
permissions:
|
16 |
-
contents: read
|
17 |
-
packages: write
|
18 |
-
|
19 |
-
env:
|
20 |
-
# Set up environment variables for the job
|
21 |
-
DOCKER_REGISTRY: ghcr.io
|
22 |
-
IMAGE_NAME: ${{ github.repository }}
|
23 |
-
TAG: ${{ github.sha }}
|
24 |
-
|
25 |
-
steps:
|
26 |
-
- name: Check out code
|
27 |
-
uses: actions/checkout@v4
|
28 |
-
|
29 |
-
- name: Free Disk Space Before Build
|
30 |
-
run: |
|
31 |
-
sudo rm -rf /usr/local/.ghcup
|
32 |
-
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
33 |
-
sudo rm -rf /usr/local/lib/android
|
34 |
-
sudo rm -rf /usr/share/dotnet
|
35 |
-
sudo rm -rf /opt/ghc
|
36 |
-
sudo rm -rf /usr/local/share/boost
|
37 |
-
|
38 |
-
- name: Set up Docker Buildx
|
39 |
-
uses: docker/setup-buildx-action@v2
|
40 |
-
with:
|
41 |
-
install: true
|
42 |
-
|
43 |
-
# Log in to the GitHub Container Registry only when not running on a pull request event
|
44 |
-
- name: Login to Docker Registry
|
45 |
-
uses: docker/login-action@v2
|
46 |
-
with:
|
47 |
-
registry: ${{ env.DOCKER_REGISTRY }}
|
48 |
-
username: ${{ github.actor }}
|
49 |
-
password: ${{ secrets.GITHUB_TOKEN }}
|
50 |
-
|
51 |
-
- name: Extract metadata (tags, labels) for Docker
|
52 |
-
id: meta
|
53 |
-
uses: docker/metadata-action@v4
|
54 |
-
with:
|
55 |
-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
56 |
-
|
57 |
-
# Build and push the Docker image to GHCR for the main branch or specific tags
|
58 |
-
- name: Build and Push Docker Image
|
59 |
-
if: github.ref == 'refs/heads/main'
|
60 |
-
uses: docker/build-push-action@v4
|
61 |
-
with:
|
62 |
-
context: .
|
63 |
-
file: Dockerfile
|
64 |
-
push: true
|
65 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
66 |
-
labels: version=${{ github.run_id }}
|
67 |
-
platforms: linux/amd64,linux/arm64
|
68 |
-
|
69 |
-
# For tagged releases, build and push the Docker image with the corresponding tag
|
70 |
-
- name: Build and Push Docker Image (Tagged)
|
71 |
-
if: startsWith(github.ref, 'refs/tags/')
|
72 |
-
uses: docker/build-push-action@v4
|
73 |
-
with:
|
74 |
-
context: .
|
75 |
-
file: Dockerfile
|
76 |
-
push: true
|
77 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
|
78 |
-
labels: version=${{ github.run_id }}
|
79 |
-
platforms: linux/amd64,linux/arm64
|
80 |
-
|
81 |
-
build-and-push-image-min:
|
82 |
-
runs-on: ubuntu-latest
|
83 |
-
|
84 |
-
permissions:
|
85 |
-
contents: read
|
86 |
-
packages: write
|
87 |
-
|
88 |
-
env:
|
89 |
-
# Set up environment variables for the job
|
90 |
-
DOCKER_REGISTRY: ghcr.io
|
91 |
-
IMAGE_NAME: ${{ github.repository }}-min
|
92 |
-
TAG: ${{ github.sha }}
|
93 |
-
|
94 |
-
steps:
|
95 |
-
- name: Check out code
|
96 |
-
uses: actions/checkout@v4
|
97 |
-
|
98 |
-
- name: Free Disk Space Before Build
|
99 |
-
run: |
|
100 |
-
sudo rm -rf /usr/local/.ghcup
|
101 |
-
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
102 |
-
sudo rm -rf /usr/local/lib/android
|
103 |
-
sudo rm -rf /usr/share/dotnet
|
104 |
-
sudo rm -rf /opt/ghc
|
105 |
-
sudo rm -rf /usr/local/share/boost
|
106 |
-
|
107 |
-
- name: Set up Docker Buildx
|
108 |
-
uses: docker/setup-buildx-action@v2
|
109 |
-
with:
|
110 |
-
install: true
|
111 |
-
|
112 |
-
# Log in to the GitHub Container Registry only when not running on a pull request event
|
113 |
-
- name: Login to Docker Registry
|
114 |
-
uses: docker/login-action@v2
|
115 |
-
with:
|
116 |
-
registry: ${{ env.DOCKER_REGISTRY }}
|
117 |
-
username: ${{ github.actor }}
|
118 |
-
password: ${{ secrets.GITHUB_TOKEN }}
|
119 |
-
|
120 |
-
- name: Extract metadata (tags, labels) for Docker
|
121 |
-
id: meta
|
122 |
-
uses: docker/metadata-action@v4
|
123 |
-
with:
|
124 |
-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
125 |
-
|
126 |
-
# Build and push the Docker image to GHCR for the main branch or specific tags
|
127 |
-
- name: Build and Push Docker Image
|
128 |
-
if: github.ref == 'refs/heads/main'
|
129 |
-
uses: docker/build-push-action@v4
|
130 |
-
with:
|
131 |
-
context: .
|
132 |
-
file: Dockerfile.min
|
133 |
-
push: true
|
134 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
135 |
-
labels: version=${{ github.run_id }}
|
136 |
-
platforms: linux/amd64,linux/arm64
|
137 |
-
|
138 |
-
# For tagged releases, build and push the Docker image with the corresponding tag
|
139 |
-
- name: Build and Push Docker Image (Tagged)
|
140 |
-
if: startsWith(github.ref, 'refs/tags/')
|
141 |
-
uses: docker/build-push-action@v4
|
142 |
-
with:
|
143 |
-
context: .
|
144 |
-
file: Dockerfile.min
|
145 |
-
push: true
|
146 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
|
147 |
-
labels: version=${{ github.run_id }}
|
148 |
-
platforms: linux/amd64,linux/arm64
|
149 |
-
|
150 |
-
build-and-push-image-rocm:
|
151 |
-
runs-on: ubuntu-latest
|
152 |
-
|
153 |
-
permissions:
|
154 |
-
contents: read
|
155 |
-
packages: write
|
156 |
-
|
157 |
-
env:
|
158 |
-
# Set up environment variables for the job
|
159 |
-
USE_ROCM: 1
|
160 |
-
DOCKER_REGISTRY: ghcr.io
|
161 |
-
IMAGE_NAME: ${{ github.repository }}-rocm
|
162 |
-
TAG: ${{ github.sha }}
|
163 |
-
|
164 |
-
steps:
|
165 |
-
- name: Check out code
|
166 |
-
uses: actions/checkout@v4
|
167 |
-
|
168 |
-
- name: Free Disk Space Before Build
|
169 |
-
run: |
|
170 |
-
sudo rm -rf /usr/local/.ghcup
|
171 |
-
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
172 |
-
sudo rm -rf /usr/local/lib/android
|
173 |
-
sudo rm -rf /usr/share/dotnet
|
174 |
-
sudo rm -rf /opt/ghc
|
175 |
-
sudo rm -rf /usr/local/share/boost
|
176 |
-
|
177 |
-
- name: Set up Docker Buildx
|
178 |
-
uses: docker/setup-buildx-action@v2
|
179 |
-
with:
|
180 |
-
install: true
|
181 |
-
|
182 |
-
# Log in to the GitHub Container Registry only when not running on a pull request event
|
183 |
-
- name: Login to Docker Registry
|
184 |
-
uses: docker/login-action@v2
|
185 |
-
with:
|
186 |
-
registry: ${{ env.DOCKER_REGISTRY }}
|
187 |
-
username: ${{ github.actor }}
|
188 |
-
password: ${{ secrets.GITHUB_TOKEN }}
|
189 |
-
|
190 |
-
- name: Extract metadata (tags, labels) for Docker
|
191 |
-
id: meta
|
192 |
-
uses: docker/metadata-action@v4
|
193 |
-
with:
|
194 |
-
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
195 |
-
|
196 |
-
# Build and push the Docker image to GHCR for the main branch or specific tags
|
197 |
-
- name: Build and Push Docker Image
|
198 |
-
if: github.ref == 'refs/heads/main'
|
199 |
-
uses: docker/build-push-action@v4
|
200 |
-
with:
|
201 |
-
context: .
|
202 |
-
file: Dockerfile
|
203 |
-
push: true
|
204 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
205 |
-
labels: version=${{ github.run_id }}
|
206 |
-
platforms: linux/amd64,linux/arm64
|
207 |
-
build-args: |
|
208 |
-
USE_ROCM=1
|
209 |
-
|
210 |
-
# For tagged releases, build and push the Docker image with the corresponding tag
|
211 |
-
- name: Build and Push Docker Image (Tagged)
|
212 |
-
if: startsWith(github.ref, 'refs/tags/')
|
213 |
-
uses: docker/build-push-action@v4
|
214 |
-
with:
|
215 |
-
context: .
|
216 |
-
file: Dockerfile
|
217 |
-
push: true
|
218 |
-
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
|
219 |
-
labels: version=${{ github.run_id }}
|
220 |
-
platforms: linux/amd64,linux/arm64
|
221 |
-
build-args: |
|
222 |
-
USE_ROCM=1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|