diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ca8280a3e..efe5bcf29 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,10 +10,13 @@ jobs: CodeQL-Build: # CodeQL runs on ubuntu-latest and windows-latest runs-on: ubuntu-latest + permissions: + contents: read + security-events: write steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -21,7 +24,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8 # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java @@ -29,7 +32,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -43,4 +46,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8 diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 22419186c..c7e83d160 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -1,4 +1,4 @@ -name: release Project +name: Release Project on: push: @@ -10,6 +10,9 @@ on: jobs: release: - uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@e4a1a0385530d6861c9a9b7262058ad33b10c769 + permissions: + actions: read + contents: write + uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@v1 with: changelogPath: ./CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7970771c3..655b4d0f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ # Changelog -## [v4.10.0] - 2023-10-30 +## [5.0.0] - 2024-03-12 + +### Changed + +- #309 Updated to Node20 and upgraded release workflows to @v1 tag +- #306 update release workflow to use new prefix, remove deprecated release +- #303 fix: ensure imageNames are not empty strings +- #299 bump release workflow sha +- #298 bump minikube to fix runner deps +- #297 update release workflow + +### Added + +- #304 add v prefix for version tagging +- #302 adding ncc to build +- #301 adding release workflow artifact fix + +## [4.10.0] - 2023-10-30 ### Added diff --git a/README.md b/README.md index b51acf167..c99d521e5 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ Following are the key capabilities of this action: ### Basic deployment (without any deployment strategy) ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' manifests: | @@ -146,7 +146,7 @@ Following are the key capabilities of this action: ### Private cluster deployment ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: resource-group: yourResourceGroup name: yourClusterName @@ -166,7 +166,7 @@ Following are the key capabilities of this action: ### Canary deployment without service mesh ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }}' @@ -185,7 +185,7 @@ Following are the key capabilities of this action: To promote/reject the canary created by the above snippet, the following YAML snippet could be used: ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }}' @@ -203,7 +203,7 @@ To promote/reject the canary created by the above snippet, the following YAML sn ### Canary deployment based on Service Mesh Interface ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }}' @@ -224,7 +224,7 @@ To promote/reject the canary created by the above snippet, the following YAML sn To promote/reject the canary created by the above snippet, the following YAML snippet could be used: ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }} ' @@ -243,7 +243,7 @@ To promote/reject the canary created by the above snippet, the following YAML sn ### Blue-Green deployment with different route methods ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }}' @@ -263,7 +263,7 @@ To promote/reject the canary created by the above snippet, the following YAML sn To promote/reject the green workload created by the above snippet, the following YAML snippet could be used: ```yaml -- uses: Azure/k8s-deploy@v4 +- uses: Azure/k8s-deploy@v5 with: namespace: 'myapp' images: 'contoso.azurecr.io/myapp:${{ event.run_id }}' @@ -292,7 +292,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - uses: Azure/docker-login@v1 with: @@ -304,23 +304,23 @@ jobs: docker build . -t contoso.azurecr.io/k8sdemo:${{ github.sha }} docker push contoso.azurecr.io/k8sdemo:${{ github.sha }} - - uses: azure/setup-kubectl@v2.0 + - uses: azure/setup-kubectl@v4 # Set the target AKS cluster. - - uses: Azure/aks-set-context@v1 + - uses: Azure/aks-set-context@v4 with: creds: '${{ secrets.AZURE_CREDENTIALS }}' cluster-name: contoso resource-group: contoso-rg - - uses: Azure/k8s-create-secret@v1.1 + - uses: Azure/k8s-create-secret@v4 with: container-registry-url: contoso.azurecr.io container-registry-username: ${{ secrets.REGISTRY_USERNAME }} container-registry-password: ${{ secrets.REGISTRY_PASSWORD }} secret-name: demo-k8s-secret - - uses: Azure/k8s-deploy@v4 + - uses: Azure/k8s-deploy@v5 with: action: deploy manifests: | @@ -341,7 +341,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - uses: Azure/docker-login@v1 with: @@ -353,13 +353,13 @@ jobs: docker build . -t contoso.azurecr.io/k8sdemo:${{ github.sha }} docker push contoso.azurecr.io/k8sdemo:${{ github.sha }} - - uses: azure/setup-kubectl@v2.0 + - uses: azure/setup-kubectl@v4 - - uses: Azure/k8s-set-context@v2 + - uses: Azure/k8s-set-context@v4 with: kubeconfig: ${{ secrets.KUBE_CONFIG }} - - uses: Azure/k8s-create-secret@v1.1 + - uses: Azure/k8s-create-secret@v4 with: container-registry-url: contoso.azurecr.io container-registry-username: ${{ secrets.REGISTRY_USERNAME }} @@ -391,7 +391,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - uses: Azure/docker-login@v1 with: @@ -423,16 +423,16 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - - uses: azure/setup-kubectl@v2.0 + - uses: azure/setup-kubectl@v4 # Set the target AKS cluster. - - uses: Azure/aks-set-context@v1 + - uses: Azure/aks-set-context@v4 with: creds: '${{ secrets.AZURE_CREDENTIALS }}' cluster-name: contoso resource-group: contoso-rg - - uses: Azure/k8s-create-secret@v1.1 + - uses: Azure/k8s-create-secret@v4 with: namespace: ${{ env.NAMESPACE }} container-registry-url: contoso.azurecr.io @@ -440,7 +440,7 @@ jobs: container-registry-password: ${{ secrets.REGISTRY_PASSWORD }} secret-name: demo-k8s-secret - - uses: azure/k8s-bake@v2 + - uses: azure/k8s-bake@v3 with: renderEngine: 'helm' helmChart: './aks-helloworld/' @@ -450,7 +450,7 @@ jobs: helm-version: 'latest' id: bake - - uses: Azure/k8s-deploy@v1.2 + - uses: Azure/k8s-deploy@v5 with: action: deploy manifests: ${{ steps.bake.outputs.manifestsBundle }} diff --git a/package.json b/package.json index 1e6e6ab11..f106c9c72 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "k8s-deploy-action", - "version": "0.0.0", + "version": "5.0.0", "author": "Deepak Sattiraju", "license": "MIT", "scripts": { - "build": "npm i ncc && npx ncc build src/run.ts -o lib", + "prebuild": "npm i @ncc/vercel", + "build": "ncc build src/run.ts -o lib", "test": "jest", "coverage": "jest --coverage=true", "format": "prettier --write .",