Compare commits

...

25 Commits

Author SHA1 Message Date
Chris Sidi 3cd5fe49e6 Don't use actions/checkout@master
See https://github.com/actions/toolkit/blob/master/docs/action-versioning.md
2019-12-03 19:20:23 -05:00
Mike Coutermarsh d675ee1249 Merge pull request #207 from Twonki/patch-1
Fixed Broken Links
2019-11-29 18:16:04 -05:00
Mike Coutermarsh c01d4fce64 Merge pull request #217 from actions/docs/google-starter-workflow
Update google.yml
2019-11-29 18:15:04 -05:00
John Bohannon 6150fb4632 Update google.yml 2019-11-21 08:47:27 -05:00
John Bohannon 481a0913ef Update google.yml 2019-11-20 21:29:34 -05:00
L. Applis 611aeebdf7 Fixed Broken Links
There was no Code of Conduct in this Repository, so it points to the one given as proposal in the Issue Template. 

There is a Licence, however the link was broken for me too.
2019-11-19 11:56:51 +00:00
Andy McKay c8833c3887 Merge pull request #202 from sclaire-1/master
Edit CONTRIBUTING.md
2019-11-18 10:57:33 -08:00
sclaire-1 7b17fb7a4b Edit CONTRIBUTING.md
The sentence introducing the requirements before merging has been edited to improve flow
2019-11-17 16:44:11 -08:00
Edward Thomson bf76e89bff Merge pull request #195 from ethomson/cloud
Add cloud starter workflows
2019-11-14 06:42:11 -08:00
Trey 05a16cf675 Add partner workflows 2019-11-14 06:37:06 -08:00
Chris Sidi a33d16cad6 Use separate steps for install, build and test (#192)
* Use separate steps for install, build and test

Having separate steps makes it easier to determine what failed.

Switching from `npm ci` to `npm install` because the Windows image uses node v8.10.0 and npm v5.6.0. `ci` was introduced in npm v5.7.0.

See https://github.com/actions/virtual-environments/issues/88

* Remove `name`
2019-11-12 11:06:49 -05:00
Mike Coutermarsh 2ce3a0ec1a Merge pull request #179 from josh/docker
Add Docker push to GitHub Package Registry
2019-11-07 17:34:45 -08:00
Mike Coutermarsh 00e9f4c09e Merge pull request #181 from cclauss/patch-1
Upgrade from Python 3.7 to 3.8
2019-11-04 16:54:56 -08:00
Mike Coutermarsh ec1515576f Merge pull request #182 from cclauss/patch-2
Add Python 3.8 to the tests
2019-11-04 16:54:24 -08:00
Mike Coutermarsh d905e1a4db Merge pull request #183 from danielpclin/patch-1
Gradle: Granting execute permission for gradlew
2019-11-04 16:49:13 -08:00
Joshua Peek 8c3d01f201 Add Docker push to GitHub Package Registry
Co-authored-by: Nathan Herald <me@nathanherald.com>
2019-11-04 12:35:20 -08:00
Andy McKay a8bbec5200 Merge pull request #164 from jdkelley/jdkelley/brokenLink
Fix broken link. CONTRIBUTING.md is not in the same directory as pull…
2019-11-04 08:21:40 -08:00
林柏臣 30640b57f2 Gradle: Granting execute permission for gradlew
`./gradlew` build fails because it does not have execute permissions. Adding the execute permissions using chmod fixes this issue.
See https://github.com/actions/starter-workflows/pull/70
2019-11-04 10:46:50 +08:00
Christian Clauss c174991b14 Add Python 3.8 to the tests 2019-11-03 14:43:52 +01:00
Christian Clauss e9d34e43e5 Upgrade from Python 3.7 to 3.8 2019-11-03 14:41:39 +01:00
Joshua Kelley a4dd230e64 Change relative link to fully qualified link. 2019-11-01 22:57:48 -04:00
Mike Coutermarsh a8be2ef60a Merge pull request #173 from actions/ethomson/dotnetcore
Rename "ASP.NET Core" to ".NET Core", add language identifiers.
2019-10-23 17:16:20 -07:00
Edward Thomson c7129d8fd7 Properties: Rename "ASP.NET Core" to ".NET Core", add language categories
Add language categories matching linguist identifiers so that .NET Core template is recommended.
2019-10-23 14:03:00 +01:00
Edward Thomson b1a374cb86 Rename "ASP.NET Core" to ".NET Core"
The .NET Core template is not ASP specific.  Change the name to ".NET Core".
2019-10-23 13:45:35 +01:00
Joshua Kelley 62b675a84c Fix broken link. CONTRIBUTING.md is not in the same directory as pull_request_template.md. 2019-10-11 12:22:25 -04:00
18 changed files with 318 additions and 21 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](CONTRIBUTING.md). Here's a few things for you to consider in this pull request:
Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](https://github.com/actions/starter-workflows/blob/master/CONTRIBUTING.md). Here's a few things for you to consider in this pull request:
- [ ] Include a good description of the workflow.
- [ ] Links to the language or tool will be nice (unless its really obvious)
+4 -3
View File
@@ -4,11 +4,12 @@
Hi there 👋 We are excited that you want to contribute a new workflow to this repo. By doing this you are helping people get up and running with GitHub Actions and that's cool 😎.
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](https://github.com/actions/starter-workflows/blob/master/LICENSE).
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
Please note that this project is released with a [Contributor Code of Conduct](
https://github.com/actions/.github/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
There are few requirements for adding in a new workflow, which we'll need to review before we merge:
Before merging a new workflow, the following requirements need to be met:
- Should be as simple as is needed for the service.
- There are many programming languages and tools out there. Right now we don't have a page that allows for a really large number of workflows, so we do have to be a little choosy about what we accept. Less popular tools or languages might not be accepted.
+82
View File
@@ -0,0 +1,82 @@
# This workflow will build and push a new container image to Amazon ECR,
# and then will deploy a new task definition to Amazon ECS, on every push
# to the master branch.
#
# To use this workflow, you will need to complete the following set-up steps:
#
# 1. Create an ECR repository to store your images.
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`.
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name.
# Replace the value of `aws-region` in the workflow below with your repository's region.
#
# 2. Create an ECS task definition, an ECS cluster, and an ECS service.
# For example, follow the Getting Started guide on the ECS console:
# https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun
# Replace the values for `service` and `cluster` in the workflow below with your service and cluster names.
#
# 3. Store your ECS task definition as a JSON file in your repository.
# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`.
# Replace the value of `task-definition` in the workflow below with your JSON file's name.
# Replace the value of `container-name` in the workflow below with the name of the container
# in the `containerDefinitions` section of the task definition.
#
# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
# See the documentation for each action used below for the recommended IAM policies for this IAM user,
# and best practices on handling the access key credentials.
on:
push:
branches:
- master
name: Deploy to Amazon ECS
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: my-ecr-repo
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: sample-app
image: ${{ steps.build-image.outputs.image }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: sample-app-service
cluster: default
wait-for-service-stability: true
+43
View File
@@ -0,0 +1,43 @@
# This workflow will build and push a node.js application to an Azure Web App on every push to the master branch.
#
# To configure this workflow:
#
# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile.
#
# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below).
#
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
on:
push:
branches:
- master
env:
AZURE_WEBAPP_NAME: your-app-name # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '10.x' # set this to the node version to use
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
npm run test --if-present
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v1
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
+73
View File
@@ -0,0 +1,73 @@
name: Docker
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
env:
# TODO: Change variable to your image's name.
IMAGE_NAME: image
jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile
fi
# Push image to GitHub Package Registry.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v1
- name: Build image
run: docker build . --file Dockerfile --tag image
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag image $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
+1 -1
View File
@@ -1,4 +1,4 @@
name: ASP.NET Core CI
name: .NET Core
on: [push]
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v1
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
+74
View File
@@ -0,0 +1,74 @@
# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE.
#
# To configure this workflow:
#
# 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc.
#
# 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs).
#
# 3. Change the values for the GKE_ZONE, GKE_CLUSTER and IMAGE environment variables (below).
name: Build and Deploy to GKE
on:
push:
branches:
- master
# Environment variables available to all jobs and steps in this workflow
env:
GKE_PROJECT: ${{ secrets.GKE_PROJECT }}
GKE_EMAIL: ${{ secrets.GKE_EMAIL }}
GITHUB_SHA: ${{ github.sha }}
GKE_ZONE: us-west1-a
GKE_CLUSTER: example-gke-cluster
IMAGE: gke-test
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
# Setup gcloud CLI
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GKE_EMAIL }}
service_account_key: ${{ secrets.GKE_KEY }}
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
# Set up docker to authenticate
# via gcloud command-line tool.
gcloud auth configure-docker
# Build the Docker image
- name: Build
run: |
docker build -t gcr.io/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |
docker push gcr.io/$GKE_PROJECT/$IMAGE:$GITHUB_SHA
# Set up kustomize
- name: Set up Kustomize
run: |
curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |
gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
./kustomize edit set image gcr.io/$GKE_PROJECT/$IMAGE:${GITHUB_SHA}
./kustomize build . | kubectl apply -f -
kubectl rollout status deployment/gke-test
kubectl get services -o wide
+2
View File
@@ -13,5 +13,7 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
+3 -5
View File
@@ -17,10 +17,8 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm test
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
@@ -1,6 +0,0 @@
{
"name": "ASP.NET Core",
"description": "Build and test an ASP.NET Core project targeting .NET Core.",
"iconName": "dotnetcore",
"categories": ["ASP", "ASP.NET", ".NET"]
}
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Deploy to Amazon ECS",
"description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.",
"iconName": "aws",
"categories": null
}
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Deploy Node.js to Azure Web App",
"description": "Build a Node.js project and deploy it to an Azure Web App.",
"iconName": "azure",
"categories": null
}
@@ -0,0 +1,6 @@
{
"name": "Docker push",
"description": "Build, test and push Docker image to GitHub Package Registry.",
"iconName": "docker",
"categories": ["Dockerfile"]
}
@@ -0,0 +1,6 @@
{
"name": ".NET Core",
"description": "Build and test a .NET Core or ASP.NET Core project.",
"iconName": "dotnetcore",
"categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"]
}
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Build and Deploy to GKE",
"description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.",
"iconName": "googlegke",
"categories": null
}
+2 -2
View File
@@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
+2 -2
View File
@@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
max-parallel: 5
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1