|
@@ -0,0 +1,84 @@
|
|
|
+name: UpgradeRelease
|
|
|
+
|
|
|
+on:
|
|
|
+ workflow_dispatch:
|
|
|
+ inputs:
|
|
|
+ version:
|
|
|
+ description: "new version number"
|
|
|
+ required: true
|
|
|
+
|
|
|
+jobs:
|
|
|
+
|
|
|
+ netmaker-nmctl:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ ref: release_${{ github.event.inputs.version}}
|
|
|
+ fetch-depth: 0
|
|
|
+ - name: Get Tags
|
|
|
+ run: |
|
|
|
+ git fetch --force --tags
|
|
|
+ - name: Setup go
|
|
|
+ uses: actions/setup-go@v3
|
|
|
+ with:
|
|
|
+ go-version: 1.19
|
|
|
+ - name: GoReleaser
|
|
|
+ uses: goreleaser/goreleaser-action@v4
|
|
|
+ with:
|
|
|
+ args: release --clean --release-notes release.md
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+
|
|
|
+ docker:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ ref: release_${{ github.event.inputs.version}}
|
|
|
+ - name: Set up QEMU
|
|
|
+ uses: docker/setup-qemu-action@v2
|
|
|
+ - name: Set up Docker Buildx
|
|
|
+ uses: docker/setup-buildx-action@v2
|
|
|
+ - name: Login to DockerHub
|
|
|
+ uses: docker/login-action@v2
|
|
|
+ with:
|
|
|
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+ - name: Build and push
|
|
|
+ uses: docker/build-push-action@v3
|
|
|
+ with:
|
|
|
+ context: .
|
|
|
+ platforms: linux/amd64, linux/arm64, linux/arm/v7
|
|
|
+ push: true
|
|
|
+ tags: ${{ github.repository }}:${{ github.event.inputs.version }}, ${{ github.repository }}:latest
|
|
|
+ build-args: |
|
|
|
+ tags=ce
|
|
|
+
|
|
|
+ docker-ee:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ ref: release_${{ github.event.inputs.version}}
|
|
|
+ - name: Set up QEMU
|
|
|
+ uses: docker/setup-qemu-action@v2
|
|
|
+ - name: Set up Docker Buildx
|
|
|
+ uses: docker/setup-buildx-action@v2
|
|
|
+ - name: Login to DockerHub
|
|
|
+ uses: docker/login-action@v2
|
|
|
+ with:
|
|
|
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+ - name: Build and push
|
|
|
+ uses: docker/build-push-action@v3
|
|
|
+ with:
|
|
|
+ context: .
|
|
|
+ platforms: linux/amd64, linux/arm64
|
|
|
+ push: true
|
|
|
+ tags: ${{ github.repository }}:${{ github.event.inputs.version }}-ee
|
|
|
+ build-args: |
|
|
|
+ tags=ee
|