|
9 | 9 | jobs: |
10 | 10 | dagger-build-satellite: |
11 | 11 | runs-on: ubuntu-latest |
| 12 | + permissions: |
| 13 | + contents: read |
| 14 | + packages: write |
12 | 15 | # unless you specify the success on the event, |
13 | 16 | # this job will also run if the lint workflow was skipped(which is also the case if the condition for the file extension type is false). |
14 | | - if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 17 | + # if: ${{ github.event.workflow_run.conclusion == 'success' }} |
15 | 18 | steps: |
16 | 19 | - name: Checkout repository |
17 | 20 | uses: actions/checkout@v4 |
18 | 21 |
|
19 | | - - name: Setup Go |
20 | | - uses: actions/setup-go@v4 |
| 22 | + - name: Call Dagger Function to build and publish on Github |
| 23 | + uses: dagger/dagger-for-github@v5 |
21 | 24 | with: |
22 | | - go-version: '>=1.22' |
23 | | - |
24 | | - - name: Update CA certificates |
25 | | - run: | |
26 | | - sudo apt-get update |
27 | | - sudo apt-get install -y ca-certificates |
28 | | - sudo update-ca-certificates |
29 | | -
|
30 | | - - name: Install curl and Docker |
31 | | - run: | |
32 | | - sudo apt-get install -y curl |
33 | | - curl -fsSL https://get.docker.com -o get-docker.sh |
34 | | - sudo sh get-docker.sh |
35 | | -
|
36 | | - - name: Verify Docker installation |
37 | | - run: docker --version |
38 | | - |
39 | | - - name: Install Dagger CLI |
40 | | - run: | |
41 | | - cd /usr/local |
42 | | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.12.3 sudo sh |
43 | | - cd - |
44 | | -
|
45 | | - - name: Build Satellite with Dagger |
46 | | - run: dagger run go run ci/main.go satellite |
47 | | - env: |
48 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
49 | | - GITHUB_USERNAME: ${{ github.repository_owner }} |
50 | | - GITHUB_REPOSITORY: ${{ github.repository }} |
51 | | - GITHUB_SHA: ${{ github.sha }} |
52 | | - |
53 | | - dagger-build-ground-control: |
54 | | - # unless you specify the success on the event, |
55 | | - # this job will also run if the lint workflow was skipped(which is also the case if the condition for the file extension type is false). |
56 | | - if: ${{ github.event.workflow_run.conclusion == 'success' }} |
57 | | - runs-on: ubuntu-latest |
58 | | - steps: |
59 | | - - name: Checkout repository |
60 | | - uses: actions/checkout@v4 |
61 | | - |
62 | | - - name: Setup Go |
63 | | - uses: actions/setup-go@v4 |
64 | | - with: |
65 | | - go-version: '>=1.22' |
66 | | - |
67 | | - - name: Update CA certificates |
68 | | - run: | |
69 | | - sudo apt-get update |
70 | | - sudo apt-get install -y ca-certificates |
71 | | - sudo update-ca-certificates |
72 | | -
|
73 | | - - name: Install curl and Docker |
74 | | - run: | |
75 | | - sudo apt-get install -y curl |
76 | | - curl -fsSL https://get.docker.com -o get-docker.sh |
77 | | - sudo sh get-docker.sh |
78 | | -
|
79 | | - - name: Verify Docker installation |
80 | | - run: docker --version |
81 | | - |
82 | | - - name: Install Dagger CLI |
83 | | - run: | |
84 | | - cd /usr/local |
85 | | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.12.3 sudo sh |
86 | | - cd - |
87 | | -
|
88 | | - - name: Build Ground Control with Dagger |
89 | | - run: dagger run go run ci/main.go ground-control |
| 25 | + version: latest |
| 26 | + verb: call |
| 27 | + module: github.com/Mehul-Kumar/harbor-satellite |
| 28 | + args: start --name=satellite --source=. --release=./ci --GITHUB-TOKEN=env:GITHUB_TOKEN --version=$GITHUB_SHA --REPO_OWNER=$GITHUB_USERNAME --REPO_NAME=harbor-satellite --RELEASE_NAME=satellite |
| 29 | + cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} |
90 | 30 | env: |
91 | 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
92 | 32 | GITHUB_USERNAME: ${{ github.repository_owner }} |
93 | | - GITHUB_REPOSITORY: ${{ github.repository }} |
94 | 33 | GITHUB_SHA: ${{ github.sha }} |
0 commit comments