feat(dl): implement DL(downloader) server (#56) #22
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: Skaffold - release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
paths: | |
- .github/workflows/release.yml | |
- "**/Dockerfile" | |
- "**/*.go" | |
- "**/*.gomod" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Skaffold Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
cloudevents-server: | |
- 'cloudevents-server/**' | |
tibuild: | |
- 'tibuild/**' | |
dl: | |
- 'dl/**' | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: | | |
image=moby/buildkit:v0.12.4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup skaffold | |
run: | | |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | |
sudo install skaffold /usr/local/bin/ | |
- name: Cache layers | |
uses: actions/cache@v3 | |
with: | |
path: "${{ github.workspace }}/.skaffold/cache" | |
key: skaffold-${{ github.sha }} | |
restore-keys: | | |
skaffold- | |
- name: Publish cloudevents-server image | |
if: steps.changes.outputs.cloudevents-server == 'true' | |
working-directory: cloudevents-server | |
run: | | |
skaffold build \ | |
--profile local-docker \ | |
--default-repo ghcr.io/pingcap-qe/ee-apps | |
- name: Publish tibuild image | |
if: steps.changes.outputs.tibuild == 'true' | |
working-directory: tibuild | |
run: | | |
skaffold build \ | |
--profile local-docker \ | |
--default-repo ghcr.io/pingcap-qe/ee-apps | |
- name: Publish dl image | |
if: steps.changes.outputs.dl == 'true' | |
working-directory: dl | |
run: | | |
skaffold build \ | |
--profile local-docker \ | |
--default-repo ghcr.io/pingcap-qe/ee-apps |