forked from johnbeard/kiplot
-
Notifications
You must be signed in to change notification settings - Fork 68
53 lines (44 loc) · 1.76 KB
/
dev_images.yml
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
# This workflow will create the development docker images
name: Create `dev` images
on:
workflow_dispatch
jobs:
push_to_registry:
strategy:
matrix:
ki_release: [dev_image_k5, dev_image_k6, dev_image_k7, dev_image_k5f, dev_image_k6f, dev_image_k7f]
name: Docker ${{ matrix.ki_release }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
# Don't create `dev` images using the `master`
if: github.ref == 'refs/heads/dev'
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd tools/${{ matrix.ki_release }}
./build.sh
clean_images:
name: Triggers the kicad_auto and kicad_auto_test clean
runs-on: ubuntu-latest
needs: push_to_registry
if: github.ref == 'refs/heads/dev'
steps:
- name: Trigger garbage collector
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "clean"}'
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto_test/dispatches --data '{"event_type": "clean"}'