Giter Site home page Giter Site logo

actions's Introduction

This repository provides a framework, guidelines and processes to author new and contribute to existing GitHub Actions deploying to Azure.

Table of contents

Introduction to GitHub Actions for Azure and Starter Action Workflows

GitHub Actions gives you the flexibility to build an automated software development lifecycle workflow.

With GitHub Actions for Azure you can create workflows that you can set up in your repository to build, test, package, release and deploy to Azure. Learn more about all other integrations with Azure.

Get started today with a free Azure account!

To easily create GitHub CI/CD workflows targeting Azure, use our Azure starter templates to deploy your apps created with popular languages and frameworks such as .NET, Node.js, Java, PHP, Ruby or Python, in containers or running on any operating system. Also the individual Action repos have a sample workflow included in their Readme file to help you quickly get started.

Please try out the GitHub Actions for Azure and share your feedback via Twitter on @Azure. If you encounter a problem, please open an issue on the GitHub repository for the specific action.

Contributing to Azure Actions

Following are the guideliens to author new Azure Actions and also to contribute to the existing ones.

Authoring and making changes

Actions Repository Permissions

Testing

Release

Monitoring

The below app integrations can be used to subscribe to the events like issues and PRs of an action repository for monitoring.

Azure Actions toolkit

Azure Actions toolkit hosting node modules to help write your azure actions

Health Dashboard for Azure Action repos

This health dashboard provides information on open issues and PRs for all the Azure Action repos. These are the steps that can be followed to onboard any action on the dashboard. We are also planning add a feature to highlight any dip in the action specific usage telemetry in the dashboard.

Contributing License Agreement

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

actions's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions's Issues

กูนี้พูดมึงต้องทำ Publish_Profile

บ่านหนาวคือเงียบแท้
ตัดตัวออกดัยสบาย
พ่อมึงอยากตายบ่


Apache License
Version 2.0, January 2004
http://www.apache.org/meet http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitionsiauv-xvnd👾🪐🤖(🌓)comment.wordpress.com

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.
สิ่งแวดล้อมวิทยุความสามารถทั้งหมดของคุณ

การค้นหาของคุณ - 17:17 น. + บ้านเหล่านกชุม, ขอนแก่น 27°27° | 14° แดดจัดเป็นส่วนใหญ่ รู้สึกเหมือน 28° • 1% อัปเดตเมื่อ 5:17 PM ตอนนี้ 18.00 น. 19.00 น. 20.00 น. 21.00 น. 22.00 น. 11P 27° 25° 24° 22° 21° 20° 19 การพยากรณ์ล่วงหน้า 10 วัน วันนี้ 27° 14 ...- ตรงกับเอกสารใดๆ the king change 3D images

คำแนะนำ:

ตรวจดูให้แน่ใจว่าสะกดถูกต้องทุกคำ
Tลองใช้คีย์เวิร์ดอื่นๆ
Tลองใช้คีย์เวิร์ดที่กว้างขึ้น
Nลองใช้คีย์เวิร์ดน้อยลง
ไทย
Mแสดง Google ใน:
ไทย English windowlive
เพิ่มเติม https://epl.paypal-communication.com/T/tpuk1983.paypla.com
มือถือ มืด: ปิด
ข้อกำหนด
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2022] [bin.com of [email protected] owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
นะรักไม่ยุ่งมุ่งสืบพันธุ์
ผจกทีมอี่มี้ฮัมบุ๊ค Unless required by applicable law or agreed to in writing, software<บักหล่าหมอนกิ่ว> distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[Publish_Profile](https://chrome.google.com/webstore#[email protected]/github.io) www.accuweather.com

az ad sp create-for-rbac output has changed

azure/actions/login@v1 action currently expects:

  {
    "clientId": "<GUID>",
    "clientSecret": "<GUID>",
    "subscriptionId": "<GUID>",
    "tenantId": "<GUID>",
    (...)
  }

However, az cli sp create-for-rbac now produces:

{
  "appId": "199b7050-dfd8-4bd4-bd94-9a68a2f9a4e8",
  "password": "<GUID>",
  "tenant": "<GUID>"
}

...and there's no more subscriptionId field.

Am i doing it wrong or configuration parsing logic needs to be updated?

CI/CD in Github Actions cannot find package.json on npm install

Question, Bug, or Feature?
Type: Bug

Enter Task Name: npm install

Environment

  • Server - Azure Pipelines
  • Windows 'windows-latest'

Issue Description

When trying to create a yml workflow for CI/CD Github Actions for an Angular WebApp the step with npm install fails because it cannot find the package.json file.

Task

name: Build and deploy Node.js app to Azure Web App - sleepdiary

on:
  push:
    branches:
      - main

jobs:
  build-and-deploy:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@master

    - name: Set up Node.js version
      uses: actions/setup-node@v1
      with:
        node-version: '12.13.0'

    - name: npm install, build, and test
      run: |
        npm install
        npm run build --if-present
        npm run test --if-present
    - name: 'Deploy to Azure Web App'
      uses: azure/webapps-deploy@v2
      with:
        app-name: 'sleepdiary'
        slot-name: 'production'
        publish-profile: ${{ secrets.AzureAppService_PublishProfile_b2cd1103c29447b58c59b7122a70e852 }}
        package: .

Error logs

Run npm install
npm install
npm run build --if-present
npm run test --if-present
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
npm WARN saveError ENOENT: no such file or directory, open 'D:\a\SleepDiary\SleepDiary\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\a\SleepDiary\SleepDiary\package.json'
npm WARN SleepDiary No description
npm WARN SleepDiary No repository field.
npm WARN SleepDiary No README data
npm WARN SleepDiary No license field.

up to date in 0.358s
found 0 vulnerabilities

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\a\SleepDiary\SleepDiary\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\a\SleepDiary\SleepDiary\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm\cache_logs\2020-09-28T07_29_03_363Z-debug.log
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\a\SleepDiary\SleepDiary\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\a\SleepDiary\SleepDiary\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm\cache_logs\2020-09-28T07_29_04_107Z-debug.log
Error: Process completed with exit code 1.

Add the location of msbuild to the path in the Action runner image generation.

Action runner has .NET framework version (Microsoft.Net.ComponentGroup.4.7.1) pre-installed. But it took a great deal to use it.
o It wasn’t easy to find out the right path of MSBuild.exe to use. GitHub has documentation around all the SW installed on Agents: https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#windows-server-2019 but the actual path to specific components within Microsoft.Net.ComponentGroup.4.7.1.DeveloperTools (example: MSbuild.exe) wasn’t listed and was tough to find.

From: Roopesh Nair [email protected]
Sent: Monday, October 21, 2019 3:34 AM
To: Usha Narayanabhatta [email protected]; Chris Patterson [email protected]
Cc: Bryan MacFarlane [email protected]
Subject: Re: setup-dotnet action only supports .NET core but not .NET framework versions

We should explore adding the location of msbuild to the path in the runner image generation. Right now, the user should know the location of msbuild to use it in run action.

@bryan MacFarlane - is this feasible?

Thanks
Roopesh Nair

No Set-up command for .NET framework

https://github.com/actions/setup-dotnet sets up GitHub Actions workflow with a specific version of the .NET core SDK. But doesn’t support .NET framework version that we needed
Opportunity: Work with GH/VS teams to create set-up action for .NET

From: Chris Patterson [email protected]
Sent: Friday, October 18, 2019 6:35 PM
To: Usha Narayanabhatta [email protected]
Cc: Bryan MacFarlane [email protected]; Roopesh Nair [email protected]
Subject: Re: setup-dotnet action only supports .NET core but not .NET framework versions

At the moment we don't have plans to support a setup vs action. But if that is something you think would be useful perhaps you could work with the vs team to get something built. For now we recommend you use the run action.

Failed to check app setting propagation

Azure/functions-action@v1 to deploy my NodeJS Azure function.
Keep getting the following warnings:

  • Warning: Failed to check app setting propagation for SCM_DO_BUILD_DURING_DEPLOYMENT, remaining retry 19
  • Warning: Failed to check app setting propagation for ENABLE_ORYX_BUILD, remaining retry 19

Each one retries all the way to 0 with several seconds of delay between each one. This causes the deployment to take nearly 10 mins when it should only take a few seconds.

How can I avoid those warnings?

Multiple Web app actions for Azure

Currently a developer who needs to deploy his web app using an action workflow must choose between the two GitHub actions below:
Azure WebApp (To deploy Windows / Linux web apps)
Azure Web app for containers (To deploy Single / multi-containerized apps)

And it is not an intuitive choice for a new user of Azure to pick the right action based on his app type.

Need action for Azure Storage for SPA

Developers want to have options for deploying single-page applications (SPA). Most developers in this space are using SPA frameworks that rely on static content being served and don't need the weight or compute of a full App Service. Many articles/examples exist of SPA developers using this approach with serverless. Having a simpler Azure Storage action instead of relying on AZ CLI action to script the multiple steps would be a useful tool for developers.

feature request: Deploy as application to Azure Batch

this is a feature request. There is Azure batch which can run custom applications on a schedule and from other services. That would be great if there will be GitHub action which can deploy to Azure batch as Application.

Thanks

No func command or action to deploy a function to Azure

Hello, I'm using the new GitHub actions beta and I want to use func to publish an Azure function, but this doesn't seem to be possible: there is no such action and func command is not found in the VM.
Did I miss something?

Configuring deployment with GitHub Actions is not currently supported for your selection of Runtime Stack

Based on:
https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel
https://github.com/Azure/actions-workflow-samples/tree/master/AppService

I am trying to enable github actions for deploying to a Azure Web App Service. But it seems its not supported I get this message:

Configuring deployment with GitHub Actions is not currently supported for your selection of Runtime Stack. If you would like to deploy using GitHub Actions please select another Runtime Stack.

I am going through the wizard in the Portal:

image

image

image

image

I basically just need to deploy my own docker images with a few mounts.

What am I missing??

azure/k8s-deploy/v1 YAMLException

The azure/k8s-deploy/v1 action is resulting in an exception due to invalid YAML. Stack trace is below:

Error: YAMLException: incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 85:
... able. This is insecure. Location: /home/runner/work/_temp/kubeco ...
^

Has there been any changes to this action that would result in this error?

BuildCanary test workflows for Azure Actions

We have GitHub Actions for Azure which take dependency on hosted runner infra.For example Azure Powershell action and azure/arm-deploy action.

We are looking at a test strategy of having canary test workflows for these Actions which can be run before updating the hosted image. The aim of these tests will be to ensure the tasks do not break with new changes in hosted image.

For example, we recently had an issue in azure/arm-deploy action - Azure/arm-deploy#48 which caused this action to fail with the release of Azure CLI Version 2.24.1 as the new CLI version had a bug. Here is the RCA for this bug for reference - Azure/arm-deploy#69.

So for such Actions to avoid such breaks we are looking at having canary tests.

We want to understand on how we can have this test infra and the process to maintain the infra and process for the teams adding tests to the canary runs.

Templates do not show up once there is a workflow

GitHub has a good getting started experience with recommendations to multiple CI templates - But all of this shows up only when you create your first workflow in a repo. There is no way to leverage the catalog of templates for a grow up scenario where a user wants to improve an existing workflow or wants to create a second workflow.

SharePoint Provider-Hosted app cannot restore local package

On a SharePoint Provider-Hosted app we have by default AppForSharePointOnlineWebToolkit.4.0.0.nupkg from local folder C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Microsoft\SharePoint\NuGet Packages
Using an github workflow to build and publish to an App service in Azure fails on build (nuget restore) with error
Unable to find version '4.0.0' of package 'AppForSharePointOnlineWebToolkit'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'AppForSharePointOnlineWebToolkit.4.0.0' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'.
https://api.nuget.org/v3/index.json: Package 'AppForSharePointOnlineWebToolkit.4.0.0' is not found on source 'https://api.nuget.org/v3/index.json'.
Unable to find version '4.0.0' of package 'AppForSharePointOnlineWebToolkit'.

  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'AppForSharePointOnlineWebToolkit.4.0.0' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'.

NuGet Config files used:
https://api.nuget.org/v3/index.json: Package 'AppForSharePointOnlineWebToolkit.4.0.0' is not found on source 'https://api.nuget.org/v3/index.json'.
C:\Users\runneradmin\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
How I can resolve this ?

Scalibility issue in health dashboard

Issue in adding more actions on the dashboard

Error:
The action takes an input parameter config which has all our queries for all repositories. So as the length of this parameter value kept increasing due to adding repositories it failed with error Environment variable 'INPUT_CONFIG' exceeds the maximum supported length. Environment variable length: 33267 , Maximum supported length: 32766.

az login command should have the clientSecret masked

When az login --service-principal -u <clientId> -p <clientSecret> --tenant <tenantId> is run in Run azure/actions/login@master the clientSecret is not masked and is visible in the logs.

I assume because this is not passed as its own, stand-alone, secret, despite the fact that using a single blob of JSON is extremely convenient.

`Azure/functions-action@v1` taking 30+ minutes with Github Actions NodeJS Function

Hi,

Please let me know if this should be in another repo, but I am using the base config in the linked examples for deploying a NodeJS function app to Azure, and our build/deploy GitHub Action Workflow is taking 30+ minutes every single time.

The Github Action gets stuck on Azure/functions-action@v1.

Any ideas why?

Here is my workflow.yml:

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and Deploy

on:
  push:
    branches:
      - development
  workflow_dispatch:

env:
  AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
  NODE_VERSION: '18.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)

jobs:
  build-and-deploy:
    runs-on: windows-latest
    steps:
      - name: 'Checkout GitHub Action'
        uses: actions/checkout@v2

      - name: Setup Node ${{ env.NODE_VERSION }} Environment
        uses: actions/setup-node@v1
        with:
          node-version: ${{ env.NODE_VERSION }}

      - name: 'Resolve Project Dependencies Using Npm'
        shell: pwsh
        run: |
          pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
          npm install
          npm run build --if-present
          npm run test --if-present
          popd

      - name: 'Run Azure Functions Action'
        uses: Azure/functions-action@v1
        id: fa
        with:
          app-name: 'my-func'
          slot-name: 'Production'
          package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
          publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE_DEV }}

And the Github Action debug logs below. It repeats this over and over:

##[debug]Deployment status: 1 'Building and Deploying 'a8c4f086abf04c2abeb4263447fe38d5'.'. retry after 5 seconds
##[debug]setting affinity cookie ["ARRAffinity=742cff616624b5c1aff4f543417be11e48cb7b9f10b45a143ff7ddcedc6fef4d;Path=/;HttpOnly;Secure;Domain=my-func.scm.azurewebsites.net","ARRAffinitySameSite=742cff616624b5c1aff4f543417be11e48cb7b9f10b45a143ff7ddcedc6fef4d;Path=/;HttpOnly;SameSite=None;Secure;Domain=my-func.scm.azurewebsites.net"]
##[debug][GET] https://my-func.scm.azurewebsites.net/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY_FUNCTIONS_V1&time=2023-05-24_18-31-48Z
##[debug]POLL URL RESULT: {"statusCode":202,"statusMessage":"Accepted","headers":{"content-length":"755","connection":"close","content-type":"application/json; charset=utf-8","date":"Wed, 24 May 2023 18:59:06 GMT","server":"Microsoft-IIS/10.0","cache-control":"no-cache","expires":"-1","location":"https://my-func.scm.azurewebsites.net/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY_FUNCTIONS_V1&time=2023-05-24_18-31-48Z","pragma":"no-cache","retry-after":"30","x-ms-request-id":"da171a94-b4ee-4bea-b699-ad6d8d01447d","x-aspnet-version":"4.0.30319","x-powered-by":"ASP.NET"},"body":{"id":"a8c4f086abf04c2abeb4263447fe38d5","status":1,"status_text":"Building and Deploying 'a8c4f086abf04c2abeb4263447fe38d5'.","author_email":"N/A","author":"N/A","deployer":"GITHUB_ZIP_DEPLOY_FUNCTIONS_V1","message":"{\"type\":\"deployment\",\"sha\":\"89a11cc5b0e874124e291836bd7e1eba2ddc46ab\",\"repoName\":\"my-repo\",\"actor\":\"<my-name>\",\"slotName\":\"production\"}","progress":"Running deployment command...","received_time":"2023-05-24T18:32:23.5766618Z","start_time":"2023-05-24T18:32:24.6246668Z","end_time":null,"last_success_end_time":null,"complete":false,"active":false,"is_temp":false,"is_readonly":true,"url":null,"log_url":null,"site_name":"my-func","provisioningState":"InProgress"}}

Improving action code management

PROBLEM STATEMENT:
Here are some problems with how we manage code in our action repos:

  • Committing build output - We commit the generated js files in code. It is not ideal to commit generated code manually.
  • Committing node_modules - We commit node_modules changes in release branches. This makes PR review harder and can potentially lead to non-reviewed code getting checked-in to the repo as it is impossible to review the changes in node_modules.
  • Making double commits - We manually cherry-pick changes from main to release branches.

SOLUTION:
Automate the committing of js files and node_modules and maintain versioning as recommended in the release-process doc.

  • Keep active development in main branch.
  • When the code is ready to be shipped, trigger the Release workflow with the new releaseVersion. This workflow will:
    • Checkout the main branch, run the build, commit and push the generated files in a new branch 'releases/{releaseVersion}'.
      Example: releaseVersion = v2.0.1, results in a new branch releases/v2.0.1 forked from master and containing js files and node_modules.
    • Create a new tag 'releaseVersion' pointing to the new 'releases/{releaseVersion}' branch.
      Example: New tag v2.0.1 gets created which points to releases/v2.0.1 branch.
    • Find the 'majorVersion' from 'releaseVersion' and force update the tag 'majorVersion' to point to the new 'releases/{releaseVersion}' branch.
      Example: Tag v2 gets created/updated and points to releases/v2.0.1 branch.

POC:
I forked container-scan action and created a POC that follows the above process:
ajinkya599/container-scan
Here is the workflow:

name: "Release action"
on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Release version. Example: v1.0.0'
        required: true
        default: 'v0.0.0'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '14'
      
      - name: Configure git
        run: |
          git config --global user.email "[email protected]"
          git config --global user.name "github-actions"
          git remote set-url origin https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/ajinkya599/container-scan 
          git remote -v

      - name: Create local branch releases/${{ github.event.inputs.version}}
        run: |
          git checkout -b releases/${{ github.event.inputs.version}}

      - name: Build code
        run: |
          npm install
          npm run-script build
          npm prune --production

      - name: Detect major version
        run: |
          version=${{ github.event.inputs.version}}
          semver=(${version//./ })
          echo "MAJOR_VERSION=${semver[0]}" >> $GITHUB_ENV
          echo "Release major version is: ${semver[0]}"

      - name: Commit and push
        run: |
          # Commit generated files
          git add -f lib/
          git add -f node_modules/
          git commit -m "[Automation]: Adding generated files - js files and node_modules"

          # Push new release branch
          git push origin -u releases/${{ github.event.inputs.version}}

          # Create minor/patch release tag and push
          git tag -a ${{ github.event.inputs.version}} -m "Created ${{ github.event.inputs.version}} release"
          git push origin ${{ github.event.inputs.version}}

          # Create/update major release tag and force push
          git tag -fa ${{ env.MAJOR_VERSION }} -m "Add/update ${{ env.MAJOR_VERSION }} tag referencing -> ${{ github.event.inputs.version}}"
          git push origin ${{ env.MAJOR_VERSION }} --force

LIMITATIONS:

  • A new release branch is created for all minor/patch versions.
  • Force updating a given patch version is not automated in this approach (The principle here is that all the releases are immutable except for the major version).

BONUS:

  • Today, for testing the changes, dev has to commit js files and node_modules in a branch. Can we facilitate manual testing for PRs, by creating a branch from the topic branch with all the generated code and share this in the PR?

Docker build takes too long

A docker build and push to acr for a simple express app is taking 1 min 30 seconds. All other actions finish in 12 seconds

Missing support for dynamically setting n-named secret outputs in an action instance

We are targeting to model Azure Key Vault action similar to the “Azure Key vault Task” that we have in Azure pipelines, which is a very popular and most widely adopted task.
The task supports secretsFilter field that accepts Wild cards & regex to fetch a list of secrets. Also user could provide a comma separated list of secret keys.

However currently GH Action Runner, you can only have as many (secret) outputs as forward declared in the action yaml. It does not support dynamically setting multiple secret output variables per action instance which is a limitation to achieve the desired behavior for the Key vault Action.

Hence this feature request to extend the current behavior to support:
(1) array input type and (2) dynamic outputs.

From: Chris Patterson [email protected]
Sent: Monday, October 7, 2019 2:30 PM
To: Usha Narayanabhatta [email protected]
Cc: Romil Goyal [email protected]; Bryan MacFarlane [email protected]; Lova Kumar Katikala [email protected]; Roopesh Nair [email protected]
Subject: Re: set-secret logging command

To support this property we will need to add support for an array input type and a map or dictionary output type. That is not going to happen by Nov 1 so you are going to have to go with a single secret for now.

Support variables in default value of action inputs

Support variables in default value of action inputs.

For example, we could default the value of creds input to a variable AZURE_CREDENTIALS and the input can be optional in the workflow, if the variable is already defined in the repository.

Sample workflow file

  # File: .github/workflows/workflow.yml
on: [push, pull_request]
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:     
    - uses: azure/actions/login@master

Azure login action metadata file

# action.yml
# Login to Azure subscription
name: 'Login Azure'
description: 'Login Azure wraps the az login, allowing for Azure actions to log into Azure'
inputs: 
  creds: 
    description: `az ad sp create-for-rbac --name <> --scopes /subscriptions/<>/resourceGroups/<> --role contributor --sdk-auth` as value of secret variable: AZURE_CREDENTIALS'
    required: true
    default: '${{ secrets.AZURE_CREDENTIALS }}'
branding:
  icon: 'login.svg' # vector art to display in the GitHub Marketplace
  color: 'blue' # optional, decorates the entry in the GitHub Marketplace
runs:
  using: 'node'
  main: 'main.js'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.