upgrade release

This commit is contained in:
Matthew R Kasun 2023-02-23 07:50:38 -05:00
parent de0a6ddb31
commit 7fac37e763

View file

@ -9,76 +9,22 @@ on:
jobs:
netmaker-nmctl:
build-packages:
uses: ./github/workflows/packages.yml
with:
version: ${{ github.event.inputs.version }}
pr-to-main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: release_${{ github.event.inputs.version}}
fetch-depth: 0
- name: Get Tags
- name: create pr
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 }}
curl \
-X POST \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}'\
-H 'X-GitHub-Api-Version: 2022-11-28' \
https://api.github.com/repos/${{ github.repository }}/pulls \
-d '{"title":"{{ github.event.inputs.version }}","head":"release_${{ github.event.inputs.version }}","base":"master"}'
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