Skip to content

Commit

Permalink
try adding commit to version for devel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
clbx committed Jul 12, 2024
1 parent 8651fe8 commit f4f2398
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 75 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build-images.yaml

This file was deleted.

23 changes: 2 additions & 21 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/[email protected]

- name: Build
run: go build -v -o kubectl-browse-pvc .
run: go build -v -ldflags "-X main.Version=${GITHUB_SHA::7}" -o kubectl-browse-pvc .

- name: Fix permissions
run: chmod +x ./kubectl-browse-pvc
Expand All @@ -42,7 +42,7 @@ jobs:
uses: actions/[email protected]

- name: Build
run: go build -v -o kubectl-browse-pvc .
run: go build -v -ldflags "-X main.Version=${GITHUB_SHA::7}" -o kubectl-browse-pvc .

- name: Fix permissions
run: chmod +x ./kubectl-browse-pvc
Expand All @@ -54,24 +54,5 @@ jobs:
path: |
./kubectl-browse-pvc
LICENSE
# integration-tests:
# runs-on: ubuntu-latest
# steps:
# - name: Create KIND Cluster
# uses: helm/[email protected]
# with:
# cluster_name: testing

# - name: Get cluster info
# run: |
# kubectl cluster-info
# kubectl get nodes

# - name: Check out Code
# uses: actions/[email protected]

# - name: Download Artifacts
# uses: actions/download-artifact@v4

21 changes: 0 additions & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,6 @@ jobs:
path: |
./kubectl-browse-pvc
LICENSE
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: Dockerfiles
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/kubectl-browse-pvc:latest
${{ secrets.DOCKERHUB_USERNAME }}/kubectl-browse-pvc:${{ github.ref_name }}
create-release:
runs-on: ubuntu-latest
needs: [build-darwin, build-linux]
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func main() {

var kubeConfigFlags = genericclioptions.NewConfigFlags(true)

if Version == "" {
Version = "devel"
}

var rootCmd = &cobra.Command{
Use: "kubectl-browse-pvc",
Short: "Kubernetes PVC Browser",
Expand Down

0 comments on commit f4f2398

Please sign in to comment.