File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Go on Linux Web App
2
+ # Build a Go project and deploy it to Azure as a Linux web app.
3
+ name : Deploy Go package to Azure Web App as a Linux web app.
4
+ on :
5
+ [push]
6
+ # CONFIGURATION
7
+ # For help, go to https://github.com/Azure/Actions
8
+ #
9
+ # 1. Set up the following secrets in your repository:
10
+ # AZURE_PUBLISH_PROFILE
11
+ #
12
+ # 2. Change these variables for your configuration:
13
+ env :
14
+ AZURE_WEBAPP_NAME : <APP_NAME> # set this to your application's name
15
+ WORKING_DIRECTORY : ' .' # set this to the path to your path of working directory inside github repository, defaults to the repository root
16
+ GO_VERSION : ' 1.18' # set this to your application's go version
17
+
18
+ jobs :
19
+ build-and-deploy :
20
+ runs-on : ubuntu-latest
21
+ environment : production
22
+ steps :
23
+ # checkout the repo
24
+ - uses : actions/checkout@master
25
+ # setup Go
26
+ - name : Setup Go
27
+ uses : actions/setup-go@v3
28
+ with :
29
+ go-version : ${{ env.GO_VERSION }}
30
+ - run : go version
31
+ # install dependencies
32
+ - name : go build
33
+ working-directory : ${{ env.WORKING_DIRECTORY }}
34
+ run : |
35
+ go build
36
+ - name : ' Deploy to Azure Web App'
37
+ id : deploy-to-webapp
38
+ uses : azure/webapps-deploy@v2
39
+ with :
40
+ app-name : ${{ env.AZURE_WEBAPP_NAME }}
41
+ slot-name : ' Production'
42
+ publish-profile : ${{ secrets.AZURE_PUBLISH_PROFILE}}
43
+ package : .
You can’t perform that action at this time.
0 commit comments