Skip to content

Commit

Permalink
ci: build and push to tsuru repo
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheu committed May 23, 2024
1 parent 1d4b45e commit 18614c3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 70 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: "1.21"
- uses: golangci/golangci-lint-action@v3
with:
version: v1.56
- run: make test

node-problem-detector:
name: "Publish node-problem-detector image on dockerhub"
needs:
- test
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: Surgo/docker-smart-tag-action@v1
id: smarttag
with:
docker_image: tsuru/node-problem-detector
default_branch: master
tag_with_sha: "true"
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/build-push-action@v5
with:
file: ./Dockerfile
push: true
tags: ${{ steps.smarttag.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64
25 changes: 0 additions & 25 deletions .github/workflows/tag-release.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/update-deps.yml

This file was deleted.

0 comments on commit 18614c3

Please sign in to comment.