|
86 | 86 | directory=".ci/${RUNNER_OS,,}" |
87 | 87 |
|
88 | 88 | if [ "$RUNNER_OS" == "Windows" ]; then |
89 | | - powershell "$directory"/Release.ps1 -BuildFlags "${{matrix.flags}}" |
| 89 | + powershell .ci/windows/Release.ps1 -BuildFlags "${{matrix.flags}}" |
90 | 90 | else |
91 | 91 | BUILDFLAGS="${{matrix.flags}} --target=${{matrix.target}}" \ |
92 | 92 | RUSTFLAGS="${{matrix.rustflags}}" \ |
@@ -119,123 +119,87 @@ jobs: |
119 | 119 | directories: .result |
120 | 120 | secret-key: ${{secrets.S3_SECRET_KEY}} |
121 | 121 | endpoint: ${{secrets.S3_ENDPOINT}} |
122 | | - prefix: /noel/artifacts |
| 122 | + prefix: /artifacts |
123 | 123 | region: us-east-1 |
124 | 124 | bucket: august |
125 | 125 |
|
126 | | -# - name: Upload binary to S3 (latest) |
127 | | -# uses: Noelware/[email protected] |
128 | | -# with: |
129 | | -# enforce-path-access-style: true |
130 | | -# access-key-id: ${{secrets.S3_ACCESS_KEY}} |
131 | | -# secret-key: ${{secrets.S3_SECRET_KEY}} |
132 | | -# path-format: $(prefix)/ume/latest/$(file) |
133 | | -# directories: .result |
134 | | -# endpoint: ${{secrets.S3_ENDPOINT}} |
135 | | -# prefix: /noel/artifacts |
136 | | -# region: us-east-1 |
137 | | -# bucket: august |
138 | | -# nix-build: |
139 | | -# name: Nix Build |
140 | | -# runs-on: ubuntu-latest |
141 | | -# steps: |
142 | | -# - name: Checkout source code |
143 | | -# uses: actions/checkout@v4 |
144 | | - |
145 | | -# - name: Install `nix` binary |
146 | | -# uses: cachix/install-nix-action@v31 |
147 | | -# with: |
148 | | -# nix_path: nixpkgs=channel:nixos-unstable |
149 | | - |
150 | | -# - name: Setup Cachix |
151 | | -# uses: cachix/cachix-action@v16 |
152 | | -# with: |
153 | | -# name: noel |
154 | | -# authToken: ${{secrets.CACHIX_AUTH_TOKEN}} |
155 | | - |
156 | | -# - name: Build `ume` binary |
157 | | -# run: nix build .#ume |
158 | | -# docker: |
159 | | -# name: Build Docker Image [${{matrix.dockerfile}}] |
160 | | -# runs-on: ubuntu-latest |
161 | | -# strategy: |
162 | | -# fail-fast: true |
163 | | -# matrix: |
164 | | -# dockerfile: |
165 | | -# - debian |
166 | | -# - alpine |
167 | | -# include: |
168 | | -# - dockerfile: debian |
169 | | -# suffix: "" |
170 | | -# updateDescription: true |
171 | | -# - dockerfile: alpine |
172 | | -# suffix: "-alpine" |
173 | | -# updateDescription: false |
174 | | -# steps: |
175 | | -# - name: Checkout source code |
176 | | -# uses: actions/checkout@v4 |
177 | | - |
178 | | -# - name: Get Git tag |
179 | | -# uses: auguwu/git-tag-action@master |
180 | | -# id: tag |
181 | | - |
182 | | -# - name: Get commit hash |
183 | | -# id: commit-hash |
184 | | -# run: echo "commit=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_OUTPUT |
185 | | - |
186 | | -# - name: Login into Docker Hub |
187 | | -# uses: docker/login-action@v3 |
188 | | -# with: |
189 | | -# username: auguwu |
190 | | -# password: ${{ secrets.DOCKER_PASSWORD }} |
191 | | - |
192 | | -# - name: Login into GitHub Container Registry |
193 | | -# uses: docker/login-action@v3 |
194 | | -# with: |
195 | | -# registry: ghcr.io |
196 | | -# username: ${{github.repository_owner}} |
197 | | -# password: ${{secrets.GH_TOKEN}} |
198 | | - |
199 | | -# - name: Set up QEMU |
200 | | -# uses: docker/setup-qemu-action@v3 |
201 | | - |
202 | | -# - name: Set up Docker Buildx |
203 | | -# uses: docker/setup-buildx-action@v3 |
204 | | - |
205 | | -# - name: Build and push! |
206 | | -# uses: docker/build-push-action@v6 |
207 | | -# with: |
208 | | -# provenance: false |
209 | | -# platforms: linux/amd64,linux/arm64 |
210 | | -# cache-from: type=gha |
211 | | -# cache-to: type=gha |
212 | | -# context: . |
213 | | -# file: ./distribution/docker/${{matrix.dockerfile}}.Dockerfile |
214 | | -# push: true |
215 | | -# sbom: true |
216 | | -# tags: | |
217 | | -# ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}}, |
218 | | -# ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}}, |
219 | | -# ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}}, |
220 | | -# ghcr.io/auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }} |
221 | | -# auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}}, |
222 | | -# auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}}, |
223 | | -# auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}}, |
224 | | -# auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }} |
225 | | -# labels: | |
226 | | -# org.opencontainers.image.title=ume |
227 | | -# org.opencontainers.image.description="π»ββοΈπ Easy, self-hostable, and flexible image host made in Rust" |
228 | | -# org.opencontainers.image.version=${{steps.tag.outputs.version}} |
229 | | -# org.opencontainers.image.revision=${{steps.commit-hash.outputs.commit}} |
230 | | -# org.opencontainers.image.licenses=Apache-2.0 |
231 | | -# org.opencontainers.image.documentation=https://floofy.dev/oss/ume |
232 | | -# org.opencontainers.image.source=https://github.com/auguwu/ume/tree/${{steps.commit-hash.outputs.commit}} |
233 | | - |
234 | | -# - name: Update Docker Hub description |
235 | | -# uses: peter-evans/dockerhub-description@v4 |
236 | | -# if: matrix.updateDescription |
237 | | -# with: |
238 | | -# username: auguwu |
239 | | -# password: ${{secrets.DOCKER_PASSWORD}} |
240 | | -# repository: auguwu/ume |
241 | | -# readme-filepath: ./distribution/docker/README.md |
| 126 | + nix-build: |
| 127 | + name: Nix Build |
| 128 | + runs-on: ubuntu-latest |
| 129 | + steps: |
| 130 | + - uses: actions/checkout@v4 |
| 131 | + - uses: cachix/install-nix-action@v31 |
| 132 | + with: |
| 133 | + nix_path: nixpkgs=channel:nixos-unstable |
| 134 | + - uses: cachix/cachix-action@v16 |
| 135 | + with: |
| 136 | + name: noel |
| 137 | + authToken: ${{secrets.CACHIX_AUTH_TOKEN}} |
| 138 | + - run: nix build .#ume |
| 139 | + docker: |
| 140 | + name: Build / Docker Image [${{matrix.dockerfile}}] |
| 141 | + runs-on: ubuntu-latest |
| 142 | + strategy: |
| 143 | + fail-fast: true |
| 144 | + matrix: |
| 145 | + dockerfile: |
| 146 | + - debian |
| 147 | + - alpine |
| 148 | + include: |
| 149 | + - dockerfile: debian |
| 150 | + suffix: "" |
| 151 | + updateDescription: true |
| 152 | + - dockerfile: alpine |
| 153 | + suffix: "-alpine" |
| 154 | + updateDescription: false |
| 155 | + steps: |
| 156 | + - uses: actions/checkout@v4 |
| 157 | + - uses: auguwu/git-tag-action@master |
| 158 | + id: tag |
| 159 | + - id: commit-hash |
| 160 | + run: echo "commit=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_OUTPUT |
| 161 | + - uses: docker/login-action@v3 |
| 162 | + with: |
| 163 | + username: auguwu |
| 164 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 165 | + - uses: docker/login-action@v3 |
| 166 | + with: |
| 167 | + registry: ghcr.io |
| 168 | + username: ${{github.repository_owner}} |
| 169 | + password: ${{secrets.GH_TOKEN}} |
| 170 | + - uses: docker/setup-qemu-action@v3 |
| 171 | + - uses: docker/setup-buildx-action@v3 |
| 172 | + - uses: docker/build-push-action@v6 |
| 173 | + with: |
| 174 | + provenance: true |
| 175 | + platforms: linux/amd64,linux/arm64 |
| 176 | + cache-from: type=registry,ref=auguwu/ume:buildcache |
| 177 | + cache-to: type=registry,ref=auguwu/ume:buildcache,mode=max |
| 178 | + context: . |
| 179 | + file: ./distribution/docker/${{matrix.dockerfile}}.Dockerfile |
| 180 | + push: true |
| 181 | + sbom: true |
| 182 | + tags: | |
| 183 | + ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}}, |
| 184 | + ghcr.io/auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}}, |
| 185 | + ghcr.io/auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}}, |
| 186 | + ghcr.io/auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }} |
| 187 | + auguwu/ume:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}${{matrix.suffix}}, |
| 188 | + auguwu/ume:${{steps.tag.outputs.major}}${{matrix.suffix}}, |
| 189 | + auguwu/ume:${{steps.tag.outputs.version}}${{matrix.suffix}}, |
| 190 | + auguwu/ume:${{matrix.dockerfile == 'alpine' && 'alpine' || 'latest' }} |
| 191 | + labels: | |
| 192 | + org.opencontainers.image.title=ume |
| 193 | + org.opencontainers.image.description="π»ββοΈπ Easy, self-hostable, and flexible image host made in Rust" |
| 194 | + org.opencontainers.image.version=${{steps.tag.outputs.version}} |
| 195 | + org.opencontainers.image.revision=${{steps.commit-hash.outputs.commit}} |
| 196 | + org.opencontainers.image.licenses=Apache-2.0 |
| 197 | + org.opencontainers.image.documentation=https://floofy.dev/oss/ume |
| 198 | + org.opencontainers.image.source=https://github.com/auguwu/ume/tree/${{steps.commit-hash.outputs.commit}} |
| 199 | + - uses: peter-evans/dockerhub-description@v4 |
| 200 | + if: matrix.updateDescription |
| 201 | + with: |
| 202 | + username: auguwu |
| 203 | + password: ${{secrets.DOCKER_PASSWORD}} |
| 204 | + repository: auguwu/ume |
| 205 | + readme-filepath: ./distribution/docker/README.md |
0 commit comments