Skip to content

Commit

Permalink
Enable docker build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivaka committed Mar 13, 2024
1 parent eba64ab commit feeacbd
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,46 +47,46 @@ jobs:
- name: Test
run: go test -race ./...

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push PR
# if: ${{ github.event_name == 'pull_request' }}
# uses: docker/build-push-action@v5
# with:
# context: .
# platforms: linux/arm64,linux/amd64
# file: ./Dockerfile
# push: true
# tags: ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:${{ github.sha }}
- name: Build and push PR
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
file: ./Dockerfile
push: true
tags: ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:${{ github.sha }}

# - name: Build and push main
# if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }}
# uses: docker/build-push-action@v5
# with:
# context: .
# platforms: linux/arm64,linux/amd64
# file: ./Dockerfile
# push: true
# tags: ghcr.io/castai/egressd/egressd:${{ github.sha }}
- name: Build and push main
if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }}
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
file: ./Dockerfile
push: true
tags: ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:${{ github.sha }}

# - name: Build and push release (egressd collector)
# uses: docker/build-push-action@v5
# with:
# context: .
# push: true
# platforms: linux/arm64,linux/amd64
# file: ./Dockerfile
# tags: |
# ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:${{ env.RELEASE_TAG }}
# ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:latest
- name: Build and push release
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/arm64,linux/amd64
file: ./Dockerfile
tags: |
ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:${{ env.RELEASE_TAG }}
ghcr.io/castai/gpu-metrics-exporter/gpu-metrics-exporter:latest

0 comments on commit feeacbd

Please sign in to comment.