Skip to content

Commit a85023c

Browse files
committed
ci: add workflow to build ci img
1 parent 9169255 commit a85023c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/build_ci_img.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 🔧 Build CI Img
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
# Workflow is triggered only if deps change
9+
- "pyproject.toml"
10+
- "Dockerfile"
11+
# Allow manual trigger
12+
workflow_dispatch:
13+
14+
jobs:
15+
backend-ci-build:
16+
uses: hotosm/gh-workflows/.github/workflows/[email protected]
17+
with:
18+
build_target: ci
19+
image_tags: |
20+
"ghcr.io/${{ github.repository }}:ci"
21+
22+
invalidate-cache:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Delete CI Img Cache
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: |
29+
gh extension install actions/gh-actions-cache
30+
gh actions-cache delete image-cache-${{ runner.os }} \
31+
-R ${{ github.repository }} \
32+
-B ${{ github.ref_name }} \
33+
--confirm || true

0 commit comments

Comments
 (0)