Build And Release on Github #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_run: | |
workflows: [Lint] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
dagger-build-satellite: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build the binary for the satellite | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: latest | |
verb: call | |
module: github.com/container-registry/harbor-satellite | |
args: build --source=. --name=satellite | |
- name: Release on Github | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: latest | |
verb: call | |
module: github.com/container-registry/harbor-satellite | |
args: release --source=. --name=satellite --token=$GITHUB_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: ${{ github.repository_owner }} | |
GITHUB_SHA: ${{ github.sha }} | |
### Uncomment the below line if you wish to see the traces of the workflow on dagger cloud | |
### register to dagger cloud and get the token | |
#### https://dagger.cloud/ | |
# cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | |
build-ground-control: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build the binary for ground control | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: latest | |
verb: call | |
module: github.com/container-registry/harbor-satellite | |
args: build --source=./ground-control --name=ground-control | |
- name: Release on Github | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: latest | |
verb: call | |
module: github.com/container-registry/harbor-satellite | |
args: release --source=. --name=ground-control --token=$GITHUB_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: ${{ github.repository_owner }} | |
GITHUB_SHA: ${{ github.sha }} | |
### Uncomment the below line if you wish to see the traces of the workflow on dagger cloud | |
### register to dagger cloud and get the token | |
#### https://dagger.cloud/ | |
# cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} |