Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03566f31ab | |||
| d4827491da |
@@ -1 +0,0 @@
|
||||
* text=auto
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Code Scanning onboarding
|
||||
about: Captures all the information and tasks required to onboard a 3rd party project into Code Scanning
|
||||
title: 'Code Scanning Partner: '
|
||||
labels: 'code scanning'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
:wave: Thanks for your interest in integrating with Code Scanning! To ensure a swift onboarding of your integration, please provide the following `Requested information` and complete the `Action items` below:
|
||||
|
||||
## Requested information
|
||||
- [ ] Name of your integration:
|
||||
- [ ] Name of your product / company:
|
||||
- [ ] Description of your integration:
|
||||
- [ ] Languages supported by your integration:
|
||||
- [ ] [For integrations leveraging GitHub Actions] PR for your proposed workflow:
|
||||
- [ ] URL to an SVG logo representing your integration / product / company:
|
||||
|
||||
## Action items
|
||||
- [ ] Apply to join the GitHub Technology Partner Program: [partner.github.com/apply](https://partner.github.com/apply?partnershipType=Technology+Partner)
|
||||
- [ ] Develop your integration, by _either_ [following this guide for GitHub Actions](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions), or [integrating directly with the REST API](https://docs.github.com/en/rest/reference/code-scanning#upload-a-sarif-file)
|
||||
- [ ] [For integrations leveraging GitHub Actions] Submit a PR in this repo for your proposed starter workflow. The workflow should:
|
||||
- [ ] Live in [the `code-scanning` directory](https://github.com/actions/starter-workflows/tree/main/code-scanning)
|
||||
- [ ] Have a filename that is in accordance with your product / service / business name, in [_kebab-cased_ format](https://en.wikipedia.org/wiki/Kebab_case), with a `.yml` file extension
|
||||
- [ ] Include comments describing the workflow’s behavior ([example](https://github.com/actions/starter-workflows/blob/c59b62dee0eae1f9f368b7011cf05c2fc42cf084/code-scanning/codeql.yml#L1-L11))
|
||||
- [ ] Trigger on push, pull_request, and schedule events ([example](https://github.com/actions/starter-workflows/blob/c59b62dee0eae1f9f368b7011cf05c2fc42cf084/code-scanning/codeql.yml#L14-L21))
|
||||
- [ ] Reference your GitHub Action using a 40-char commit SHA (e.g. `uses: github/codeql-action@a3a8231e64d3db0e7da0f3b56b9521dcccdfe412`)
|
||||
- [ ] Update the `Requested information` above, ensuring all details are correct
|
||||
- [ ] When ready, please ping `@actions/advanced-security-code-scanning` in a comment below, for a review :bow:
|
||||
@@ -1,37 +1,19 @@
|
||||
This repository contains configuration for what users see when they click on the `Actions` tab and the setup page for Code Scanning.
|
||||
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:
|
||||
|
||||
It is not:
|
||||
* A playground to try out scripts
|
||||
* A place for you to create a workflow for your repository
|
||||
|
||||
---
|
||||
|
||||
**Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.**
|
||||
|
||||
---
|
||||
- [ ] Include a good description of the workflow.
|
||||
- [ ] Links to the language or tool will be nice (unless its really obvious)
|
||||
|
||||
In the workflow and properties files:
|
||||
|
||||
- [ ] The workflow filename of CI workflows should be the name of the language or platform, in lower case. Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").
|
||||
|
||||
The workflow filename of publishing workflows should be the name of the language or platform, in lower case, followed by "-publish".
|
||||
- [ ] Includes a matching `ci/properties/*.properties.json` file.
|
||||
- [ ] Use sentence case for the names of workflows and steps, for example "Run tests".
|
||||
- [ ] Use title case for the names of workflows and steps, for example "Run tests".
|
||||
- [ ] The name of CI workflows should only be the name of the language or platform: for example "Go" (not "Go CI" or "Go Build")
|
||||
- [ ] Include comments in the workflow for any parts that are not obvious or could use clarification.
|
||||
- [ ] CI workflows should run on `push` to `branches: [ $default-branch ]` and `pull_request` to `branches: [ $default-branch ]`.
|
||||
- [ ] Packaging workflows should run on `release` with `types: [ created ]`.
|
||||
- [ ] Code Scanning workflows should run on `push` to `branches: [ $default-branch, $protected-branches ]` and `pull_request` to `branches: [ $default-branch ]`. We also recommend a `schedule` trigger of `cron: $cron-weekly`.
|
||||
- [ ] CI workflows should run `push`.
|
||||
- [ ] Packaging workflows should run on `release` with `types: [created]`.
|
||||
|
||||
Some general notes:
|
||||
|
||||
- [ ] This workflow must only use actions that are produced by GitHub, [in the `actions` organization](https://github.com/actions), **or**
|
||||
- [ ] This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be [published to the GitHub Marketplace](https://github.com/marketplace?type=actions). We recommend that these actions be referenced using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file:
|
||||
```
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
```
|
||||
- [ ] Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies.
|
||||
- [ ] Automation and CI workflows cannot be dependent on a paid service or product.
|
||||
- [ ] Does not use an Action that isn't in the `actions` organization.
|
||||
- [ ] Does not send data to any 3rd party service except for the purposes of installing dependencies.
|
||||
- [ ] Does not use a paid service or product.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Close as a feature
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close Issue
|
||||
uses: peter-evans/close-issue@v1
|
||||
if: contains(github.event.issue.labels.*.name, 'feature')
|
||||
with:
|
||||
comment: |
|
||||
Thank you 🙇 for this request. This request has been classified as a feature by the maintainers.
|
||||
|
||||
We take all the requests for features seriously and have passed this on to the internal teams for their consideration.
|
||||
|
||||
Because any feature requires further maintenance and support in the long term by this team, we would like to exercise caution into adding new features. If this feature is something that can be implemented independently, please consider forking this repository and adding the feature.
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Close as a support issue
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close Issue
|
||||
uses: peter-evans/close-issue@v1
|
||||
if: contains(github.event.issue.labels.*.name, 'support')
|
||||
with:
|
||||
comment: |
|
||||
Sorry, but we'd like to keep issues related to code in this repository. Thank you 🙇
|
||||
|
||||
If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions)
|
||||
|
||||
If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/articles/about-github-actions#contacting-support)
|
||||
@@ -1,20 +0,0 @@
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "21 4 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue has become stale and will be closed automatically within a period of time. Sorry about that.'
|
||||
stale-pr-message: 'This pull request has become stale and will be closed automatically within a period of time. Sorry about that.'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
days-before-stale: 90
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Sync workflows for GHES
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
||||
git config user.email "cschleiden@github.com"
|
||||
git config user.name "GitHub Actions"
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Check starter workflows for GHES compat
|
||||
run: |
|
||||
npm ci
|
||||
npx ts-node-script ./index.ts
|
||||
working-directory: ./script/sync-ghes
|
||||
- run: |
|
||||
git add -A
|
||||
if [ -z "$(git status --porcelain)" ]; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "Updating GHES workflows"
|
||||
fi
|
||||
- run: git push
|
||||
@@ -1,21 +0,0 @@
|
||||
name: Validate Data
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate-data:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12"
|
||||
|
||||
- name: Validate workflows
|
||||
run: |
|
||||
npm ci
|
||||
npx ts-node-script ./index.ts
|
||||
working-directory: ./script/validate-data
|
||||
@@ -1 +0,0 @@
|
||||
script/**/node_modules
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"args": ["${workspaceRoot}/script/index.ts"],
|
||||
"runtimeArgs": ["-r", "ts-node/register"],
|
||||
"cwd": "${workspaceRoot}/script",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"env": {
|
||||
"TS_NODE_IGNORE": "false"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
* @actions/actions-experience
|
||||
|
||||
/code-scanning/ @actions/advanced-security-code-scanning
|
||||
+6
-11
@@ -4,21 +4,16 @@
|
||||
|
||||
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](https://github.com/actions/starter-workflows/blob/main/LICENSE).
|
||||
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).
|
||||
|
||||
Please note that this project is released with a [Contributor Code of Conduct](
|
||||
https://github.com/actions/.github/blob/main/CODE_OF_CONDUCT.md). 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][code-of-conduct]. By participating in this project you agree to abide by its terms.
|
||||
|
||||
**At this time we are only accepting new starter workflows for Code Scanning**
|
||||
|
||||
### Previous guidelines for new starter workflows.
|
||||
|
||||
Before merging a new workflow, the following requirements need to be met:
|
||||
There are few requirements for adding in a new workflow, which we'll need to review before we merge:
|
||||
|
||||
- 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.
|
||||
- Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies.
|
||||
- Automation and CI workflows cannot be dependent on a paid service or product.
|
||||
- We recommend that Actions outside of the `actions` organization be pinned to a specific SHA.
|
||||
- Should not send data to any 3rd party service except for the purposes of installing dependencies.
|
||||
- Cannot use an Action that isn't in the `actions` organization.
|
||||
- Cannot be to a paid service or product.
|
||||
|
||||
Thank you
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 GitHub
|
||||
Copyright (c) 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -18,5 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE. THIS LICENSE DOES NOT GRANT YOU RIGHTS TO USE ANY CONTRIBUTORS'
|
||||
NAME, LOGO, OR TRADEMARKS.
|
||||
SOFTWARE.
|
||||
|
||||
@@ -4,21 +4,18 @@
|
||||
|
||||
## Starter Workflows
|
||||
|
||||
These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow.
|
||||
|
||||
**If you want to get started with GitHub Actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.**
|
||||
|
||||
<img src="https://d3vv6lp55qjaqc.cloudfront.net/items/353A3p3Y2x3c2t2N0c01/Image%202019-08-27%20at%203.25.07%20PM.png" max-width="75%"/>
|
||||
|
||||
These are the workflow files for helping people get started with GitHub Actions.
|
||||
|
||||
**Directory structure:**
|
||||
* [ci](ci): solutions for Continuous Integration
|
||||
* [automation](automation): solutions for automating workflows.
|
||||
* [code-scanning](code-scanning): starter workflows for [Code Scanning](https://github.com/features/security)
|
||||
* [icons](icons): svg icons for the relevant template
|
||||
|
||||
Each workflow must be written in YAML and have a `.yml` extension. They also need a corresponding `.properties.json` file that contains extra metadata about the workflow (this is displayed in the GitHub.com UI).
|
||||
|
||||
For example: `ci/django.yml` and `ci/properties/django.properties.json`.
|
||||
For example: `ci/python-django.yml` and `ci/python-django.properties.json`.
|
||||
|
||||
**Valid properties:**
|
||||
* `name`: the name shown in onboarding
|
||||
|
||||
@@ -9,5 +9,5 @@ jobs:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: 'Message that will be displayed on users first issue'
|
||||
pr-message: 'Message that will be displayed on users first pull request'
|
||||
issue-message: 'Message that will be displayed on users'' first issue'
|
||||
pr-message: 'Message that will be displayed on users'' first pr'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
# https://github.com/actions/labeler/blob/master/README.md
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request]
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# This is a basic workflow that is manually triggered
|
||||
|
||||
name: Manual workflow
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Inputs the workflow accepts.
|
||||
inputs:
|
||||
name:
|
||||
# Friendly description to be shown in the UI instead of 'name'
|
||||
description: 'Person to greet'
|
||||
# Default value if no value is explicitly provided
|
||||
default: 'World'
|
||||
# Input has to be provided for the workflow to run
|
||||
required: true
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "greet"
|
||||
greet:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Runs a single command using the runners shell
|
||||
- name: Send greeting
|
||||
run: echo "Hello ${{ github.event.inputs.name }}"
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Manual workflow",
|
||||
"description": "Simple workflow that is manually triggered.",
|
||||
"iconName": "octicon person",
|
||||
"categories": ["Automation"]
|
||||
}
|
||||
@@ -2,7 +2,7 @@ name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'Stale issue message'
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
name: Ada (GNAT)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up GNAT toolchain
|
||||
run: >
|
||||
sudo apt-get update &&
|
||||
sudo apt-get install gnat gprbuild
|
||||
|
||||
- name: Build
|
||||
run: gprbuild -j0 -p
|
||||
@@ -1,118 +0,0 @@
|
||||
# This workflow will build and push a new container image to Alibaba Cloud Container Registry (ACR),
|
||||
# and then will deploy it to Alibaba Cloud Container Service for Kubernetes (ACK), when a release is created.
|
||||
#
|
||||
# To use this workflow, you will need to complete the following set-up steps:
|
||||
#
|
||||
# 1. Create an ACR repository to store your container images.
|
||||
# You can use ACR EE instance for more security and better performance.
|
||||
# For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm
|
||||
#
|
||||
# 2. Create an ACK cluster to run your containerized application.
|
||||
# You can use ACK Pro cluster for more security and better performance.
|
||||
# For instructions see https://www.alibabacloud.com/help/doc-detail/95108.htm
|
||||
#
|
||||
# 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`.
|
||||
# For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/
|
||||
#
|
||||
# 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME.
|
||||
#
|
||||
|
||||
name: Build and Deploy to ACK
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
# Environment variables available to all jobs and steps in this workflow.
|
||||
env:
|
||||
REGION_ID: cn-hangzhou
|
||||
REGISTRY: registry.cn-hangzhou.aliyuncs.com
|
||||
NAMESPACE: namespace
|
||||
IMAGE: repo
|
||||
TAG: ${{ github.sha }}
|
||||
ACK_CLUSTER_ID: clusterID
|
||||
ACK_DEPLOYMENT_NAME: nginx-deployment
|
||||
|
||||
ACR_EE_REGISTRY: myregistry.cn-hangzhou.cr.aliyuncs.com
|
||||
ACR_EE_INSTANCE_ID: instanceID
|
||||
ACR_EE_NAMESPACE: namespace
|
||||
ACR_EE_IMAGE: repo
|
||||
ACR_EE_TAG: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# 1.1 Login to ACR
|
||||
- name: Login to ACR with the AccessKey pair
|
||||
uses: aliyun/acr-login@v1
|
||||
with:
|
||||
region-id: "${{ env.REGION_ID }}"
|
||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||
|
||||
# 1.2 Buid and push image to ACR
|
||||
- name: Build and push image to ACR
|
||||
run: |
|
||||
docker build --tag "$REGISTRY/$NAMESPACE/$IMAGE:$TAG" .
|
||||
docker push "$REGISTRY/$NAMESPACE/$IMAGE:$TAG"
|
||||
|
||||
# 1.3 Scan image in ACR
|
||||
- name: Scan image in ACR
|
||||
uses: aliyun/acr-scan@v1
|
||||
with:
|
||||
region-id: "${{ env.REGION_ID }}"
|
||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||
repository: "${{ env.NAMESPACE }}/${{ env.IMAGE }}"
|
||||
tag: "${{ env.TAG }}"
|
||||
|
||||
# 2.1 (Optional) Login to ACR EE
|
||||
- uses: actions/checkout@v2
|
||||
- name: Login to ACR EE with the AccessKey pair
|
||||
uses: aliyun/acr-login@v1
|
||||
with:
|
||||
login-server: "https://${{ env.ACR_EE_REGISTRY }}"
|
||||
region-id: "${{ env.REGION_ID }}"
|
||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||
instance-id: "${{ env.ACR_EE_INSTANCE_ID }}"
|
||||
|
||||
# 2.2 (Optional) Build and push image ACR EE
|
||||
- name: Build and push image to ACR EE
|
||||
run: |
|
||||
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
|
||||
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
|
||||
# 2.3 (Optional) Scan image in ACR EE
|
||||
- name: Scan image in ACR EE
|
||||
uses: aliyun/acr-scan@v1
|
||||
with:
|
||||
region-id: "${{ env.REGION_ID }}"
|
||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||
instance-id: "${{ env.ACR_EE_INSTANCE_ID }}"
|
||||
repository: "${{ env.ACR_EE_NAMESPACE}}/${{ env.ACR_EE_IMAGE }}"
|
||||
tag: "${{ env.ACR_EE_TAG }}"
|
||||
|
||||
# 3.1 Set ACK context
|
||||
- name: Set K8s context
|
||||
uses: aliyun/ack-set-context@v1
|
||||
with:
|
||||
access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
|
||||
access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
|
||||
cluster-id: "${{ env.ACK_CLUSTER_ID }}"
|
||||
|
||||
# 3.2 Deploy the image to the ACK cluster
|
||||
- name: Set up Kustomize
|
||||
run: |-
|
||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6
|
||||
- name: Deploy
|
||||
run: |-
|
||||
./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG
|
||||
./kustomize build . | kubectl apply -f -
|
||||
kubectl rollout status deployment/$ACK_DEPLOYMENT_NAME
|
||||
kubectl get services -o wide
|
||||
+17
-23
@@ -1,23 +1,17 @@
|
||||
name: Android CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: set up JDK 1.8
|
||||
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
|
||||
name: Android CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
+17
-24
@@ -1,24 +1,17 @@
|
||||
# This workflow will build a Java project with Ant
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant
|
||||
|
||||
name: Java CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Ant
|
||||
run: ant -noinput -buildfile build.xml
|
||||
name: Java CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Ant
|
||||
run: ant -noinput -buildfile build.xml
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
name: ASP.NET Core CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 2.2.108
|
||||
- name: Build with dotnet
|
||||
run: dotnet build --configuration Release
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
# This workflow will build and push a new container image to Amazon ECR,
|
||||
# and then will deploy a new task definition to Amazon ECS, when a release is created
|
||||
#
|
||||
# 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:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
name: Deploy to Amazon ECS
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- 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
|
||||
@@ -1,50 +0,0 @@
|
||||
# This workflow will build and push a node.js application to an Azure Web App when a release is created.
|
||||
#
|
||||
# This workflow assumes you have already created the target Azure App Service web app.
|
||||
# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan
|
||||
#
|
||||
# To configure this workflow:
|
||||
#
|
||||
# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app **before downloading the file**.
|
||||
# For more instructions see: https://docs.microsoft.com/azure/app-service/configure-common#configure-app-settings
|
||||
#
|
||||
# 2. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile.
|
||||
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
|
||||
#
|
||||
# 3. 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:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
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
|
||||
environment: production
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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@v2
|
||||
with:
|
||||
app-name: ${{ env.AZURE_WEBAPP_NAME }}
|
||||
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
|
||||
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
|
||||
+17
-36
@@ -1,36 +1,17 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the $default-branch branch
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run a one-line script
|
||||
run: echo Hello, world!
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
echo Add other actions to build,
|
||||
echo test, and deploy your project.
|
||||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Run a one-line script
|
||||
run: echo Hello, world!
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
echo Add other actions to build,
|
||||
echo test, and deploy your project.
|
||||
|
||||
+19
-23
@@ -1,23 +1,19 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
- name: make distcheck
|
||||
run: make distcheck
|
||||
name: C/C++ CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
run: make check
|
||||
- name: make distcheck
|
||||
run: make distcheck
|
||||
|
||||
+15
-19
@@ -1,19 +1,15 @@
|
||||
name: Clojure CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: lein deps
|
||||
- name: Run tests
|
||||
run: lein test
|
||||
name: Clojure CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: lein deps
|
||||
- name: Run tests
|
||||
run: lein test
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
name: CMake
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{github.workspace}}/build
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C $BUILD_TYPE
|
||||
+18
-22
@@ -1,22 +1,18 @@
|
||||
name: Crystal CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: crystallang/crystal
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: shards install
|
||||
- name: Run tests
|
||||
run: crystal spec
|
||||
name: Crystal CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: crystallang/crystal
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: shards install
|
||||
- name: Run tests
|
||||
run: crystal spec
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
name: D
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
|
||||
|
||||
- name: 'Build & Test'
|
||||
run: |
|
||||
# Build the project, with its main file included, without unittests
|
||||
dub build --compiler=$DC
|
||||
# Build and run tests, as defined by `unittest` configuration
|
||||
# In this mode, `mainSourceFile` is excluded and `version (unittest)` are included
|
||||
# See https://dub.pm/package-format-json.html#configurations
|
||||
dub test --compiler=$DC
|
||||
+18
-41
@@ -1,41 +1,18 @@
|
||||
name: Dart
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Note that this workflow uses the latest stable version of the Dart SDK.
|
||||
# Docker images for other release channels - like dev and beta - are also
|
||||
# available. See https://hub.docker.com/r/google/dart/ for the available
|
||||
# images.
|
||||
container:
|
||||
image: google/dart:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Print Dart SDK version
|
||||
run: dart --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: dart pub get
|
||||
|
||||
# Uncomment this step to verify the use of 'dart format' on each commit.
|
||||
# - name: Verify formatting
|
||||
# run: dart format --output=none --set-exit-if-changed .
|
||||
|
||||
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
||||
- name: Analyze project source
|
||||
run: dart analyze
|
||||
|
||||
# Your project will need to have tests in test/ and a dependency on
|
||||
# package:test for this step to succeed. Note that Flutter projects will
|
||||
# want to change this to 'flutter test'.
|
||||
- name: Run tests
|
||||
run: dart test
|
||||
name: Dart CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: google/dart:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: pub get
|
||||
- name: Run tests
|
||||
run: pub run test
|
||||
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow will install Deno and run tests across stable and nightly builds on Windows, Ubuntu and macOS.
|
||||
# For more information see: https://github.com/denolib/setup-deno
|
||||
|
||||
name: Deno
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [$default-branch]
|
||||
pull_request:
|
||||
branches: [$default-branch]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
deno: ["v1.x", "nightly"]
|
||||
os: [macOS-latest, windows-latest, ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Setup repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Deno
|
||||
uses: denolib/setup-deno@c7d7968ad4a59c159a777f79adddad6872ee8d96
|
||||
with:
|
||||
deno-version: ${{ matrix.deno }} # tests across multiple Deno versions
|
||||
|
||||
- name: Cache Dependencies
|
||||
run: deno cache deps.ts
|
||||
|
||||
- name: Run Tests
|
||||
run: deno test -A --unstable
|
||||
@@ -1,30 +0,0 @@
|
||||
name: Django CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: [3.7, 3.8, 3.9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Run Tests
|
||||
run: |
|
||||
python manage.py test
|
||||
+14
-18
@@ -1,18 +1,14 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
|
||||
name: Docker Image CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
# Publish `$default-branch` as Docker `latest` image.
|
||||
branches:
|
||||
- $default-branch
|
||||
|
||||
# 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@v2
|
||||
|
||||
- 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 Packages.
|
||||
# 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@v2
|
||||
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||
|
||||
- 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
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# 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" == "$default-branch" ] && VERSION=latest
|
||||
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
@@ -1,115 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow will build, test, sign and package a WPF or Windows Forms desktop application
|
||||
# built on .NET Core.
|
||||
# To learn how to migrate your existing application to .NET Core,
|
||||
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework
|
||||
#
|
||||
# To configure this workflow:
|
||||
#
|
||||
# 1. Configure environment variables
|
||||
# GitHub sets default environment variables for every workflow run.
|
||||
# Replace the variables relative to your project in the "env" section below.
|
||||
#
|
||||
# 2. Signing
|
||||
# Generate a signing certificate in the Windows Application
|
||||
# Packaging Project or add an existing signing certificate to the project.
|
||||
# Next, use PowerShell to encode the .pfx file using Base64 encoding
|
||||
# by running the following Powershell script to generate the output string:
|
||||
#
|
||||
# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte
|
||||
# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt'
|
||||
#
|
||||
# Open the output file, SigningCertificate_Encoded.txt, and copy the
|
||||
# string inside. Then, add the string to the repo as a GitHub secret
|
||||
# and name it "Base64_Encoded_Pfx."
|
||||
# For more information on how to configure your signing certificate for
|
||||
# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing
|
||||
#
|
||||
# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key".
|
||||
# See "Build the Windows Application Packaging project" below to see how the secret is used.
|
||||
#
|
||||
# For more information on GitHub Actions, refer to https://github.com/features/actions
|
||||
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
|
||||
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
|
||||
|
||||
name: .NET Core Desktop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
configuration: [Debug, Release]
|
||||
|
||||
runs-on: windows-latest # For a list of available runner types, refer to
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
||||
|
||||
env:
|
||||
Solution_Name: your-solution-name # Replace with your solution name, i.e. MyWpfApp.sln.
|
||||
Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
|
||||
Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.
|
||||
Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Install the .NET Core workload
|
||||
- name: Install .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
|
||||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@2008f912f56e61277eefaac6d1888b750582aa16
|
||||
|
||||
# Execute all unit tests in the solution
|
||||
- name: Execute unit tests
|
||||
run: dotnet test
|
||||
|
||||
# Restore the application to populate the obj folder with RuntimeIdentifiers
|
||||
- name: Restore the application
|
||||
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
|
||||
env:
|
||||
Configuration: ${{ matrix.configuration }}
|
||||
|
||||
# Decode the base 64 encoded pfx and save the Signing_Certificate
|
||||
- name: Decode the pfx
|
||||
run: |
|
||||
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
|
||||
$certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
|
||||
[IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
|
||||
|
||||
# Create the app package by building and packaging the Windows Application Packaging project
|
||||
- name: Create the app package
|
||||
run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
|
||||
env:
|
||||
Appx_Bundle: Always
|
||||
Appx_Bundle_Platforms: x86|x64
|
||||
Appx_Package_Build_Mode: StoreUpload
|
||||
Configuration: ${{ matrix.configuration }}
|
||||
|
||||
# Remove the pfx
|
||||
- name: Remove the pfx
|
||||
run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate
|
||||
|
||||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: MSIX Package
|
||||
path: ${{ env.Wap_Project_Directory }}\AppPackages
|
||||
@@ -1,25 +0,0 @@
|
||||
name: .NET
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
+11
-21
@@ -1,31 +1,21 @@
|
||||
name: Elixir CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
name: Build and test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: elixir:1.9.1-slim
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Elixir
|
||||
uses: actions/setup-elixir@v1
|
||||
with:
|
||||
elixir-version: '1.10.3' # Define the elixir version [required]
|
||||
otp-version: '22.3' # Define the OTP version [required]
|
||||
- name: Restore dependencies cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: ${{ runner.os }}-mix-
|
||||
- name: Install dependencies
|
||||
run: mix deps.get
|
||||
- name: Run tests
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
mix local.rebar --force
|
||||
mix local.hex --force
|
||||
mix deps.get
|
||||
- name: Run Tests
|
||||
run: mix test
|
||||
|
||||
+19
-23
@@ -1,23 +1,19 @@
|
||||
name: Erlang CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: erlang:22.0.7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Compile
|
||||
run: rebar3 compile
|
||||
- name: Run tests
|
||||
run: rebar3 do eunit, ct
|
||||
name: Erlang CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: erlang:22.0.7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Compile
|
||||
run: rebar3 compile
|
||||
- name: Run tests
|
||||
run: rebar3 do eunit, ct
|
||||
|
||||
+11
-9
@@ -1,10 +1,12 @@
|
||||
name: Ruby Gem
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -12,23 +14,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Ruby 2.6
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6.x
|
||||
version: 2.6.x
|
||||
|
||||
- name: Publish to GPR
|
||||
run: |
|
||||
mkdir -p $HOME/.gem
|
||||
touch $HOME/.gem/credentials
|
||||
chmod 0600 $HOME/.gem/credentials
|
||||
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||
gem build *.gemspec
|
||||
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
||||
env:
|
||||
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
|
||||
OWNER: username
|
||||
|
||||
- name: Publish to RubyGems
|
||||
run: |
|
||||
@@ -39,4 +41,4 @@ jobs:
|
||||
gem build *.gemspec
|
||||
gem push *.gem
|
||||
env:
|
||||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
||||
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
name: Go
|
||||
on: [push]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
if [ -f Gopkg.toml ]; then
|
||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
dep ensure
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: go build -v .
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created
|
||||
#
|
||||
# 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 and GKE_SA_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, IMAGE, and DEPLOYMENT_NAME environment variables (below).
|
||||
#
|
||||
# For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke
|
||||
|
||||
name: Build and Deploy to GKE
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
env:
|
||||
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
|
||||
GKE_CLUSTER: cluster-1 # TODO: update to cluster name
|
||||
GKE_ZONE: us-central1-c # TODO: update to cluster zone
|
||||
DEPLOYMENT_NAME: gke-test # TODO: update to deployment name
|
||||
IMAGE: static-site
|
||||
|
||||
jobs:
|
||||
setup-build-publish-deploy:
|
||||
name: Setup, Build, Publish, and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Setup gcloud CLI
|
||||
- uses: google-github-actions/setup-gcloud@v0.2.0
|
||||
with:
|
||||
service_account_key: ${{ secrets.GKE_SA_KEY }}
|
||||
project_id: ${{ secrets.GKE_PROJECT }}
|
||||
|
||||
# Configure Docker to use the gcloud command-line tool as a credential
|
||||
# helper for authentication
|
||||
- run: |-
|
||||
gcloud --quiet auth configure-docker
|
||||
|
||||
# Get the GKE credentials so we can deploy to the cluster
|
||||
- uses: google-github-actions/get-gke-credentials@v0.2.1
|
||||
with:
|
||||
cluster_name: ${{ env.GKE_CLUSTER }}
|
||||
location: ${{ env.GKE_ZONE }}
|
||||
credentials: ${{ secrets.GKE_SA_KEY }}
|
||||
|
||||
# Build the Docker image
|
||||
- name: Build
|
||||
run: |-
|
||||
docker build \
|
||||
--tag "gcr.io/$PROJECT_ID/$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/$PROJECT_ID/$IMAGE:$GITHUB_SHA"
|
||||
|
||||
# Set up kustomize
|
||||
- name: Set up Kustomize
|
||||
run: |-
|
||||
curl -sfLo kustomize 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: |-
|
||||
./kustomize edit set image gcr.io/PROJECT_ID/IMAGE:TAG=gcr.io/$PROJECT_ID/$IMAGE:$GITHUB_SHA
|
||||
./kustomize build . | kubectl apply -f -
|
||||
kubectl rollout status deployment/$DEPLOYMENT_NAME
|
||||
kubectl get services -o wide
|
||||
@@ -1,33 +0,0 @@
|
||||
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
|
||||
# For more information see: https://github.com/actions/setup-java#publishing-using-gradle
|
||||
|
||||
name: Gradle Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||
|
||||
- name: Build with Gradle
|
||||
run: gradle build
|
||||
|
||||
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
||||
# the publishing section of your build.gradle
|
||||
- name: Publish to GitHub Packages
|
||||
run: gradle publish
|
||||
env:
|
||||
USERNAME: ${{ github.actor }}
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
+17
-26
@@ -1,26 +1,17 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
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
|
||||
name: Java CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
+25
-40
@@ -1,40 +1,25 @@
|
||||
name: Haskell CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: '8.10.3'
|
||||
cabal-version: '3.2'
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: cache-cabal
|
||||
with:
|
||||
path: ~/.cabal
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal update
|
||||
cabal build --only-dependencies --enable-tests --enable-benchmarks
|
||||
- name: Build
|
||||
run: cabal build --enable-tests --enable-benchmarks all
|
||||
- name: Run tests
|
||||
run: cabal test all
|
||||
name: Haskell CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: '8.6.5'
|
||||
cabal-version: '3.0'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal update
|
||||
cabal install --only-dependencies --enable-tests
|
||||
- name: Build
|
||||
run: |
|
||||
cabal configure --enable-tests
|
||||
cabal build
|
||||
- name: Run tests
|
||||
run: cabal test
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
# This workflow will build a docker container, publish it to IBM Container Registry, and deploy it to IKS when a release is created
|
||||
#
|
||||
# To configure this workflow:
|
||||
#
|
||||
# 1. Ensure that your repository contains a Dockerfile
|
||||
# 2. Setup secrets in your repository by going to settings: Create ICR_NAMESPACE and IBM_CLOUD_API_KEY
|
||||
# 3. Change the values for the IBM_CLOUD_REGION, REGISTRY_HOSTNAME, IMAGE_NAME, IKS_CLUSTER, DEPLOYMENT_NAME, and PORT
|
||||
|
||||
name: Build and Deploy to IKS
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
# Environment variables available to all jobs and steps in this workflow
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
|
||||
IBM_CLOUD_REGION: us-south
|
||||
ICR_NAMESPACE: ${{ secrets.ICR_NAMESPACE }}
|
||||
REGISTRY_HOSTNAME: us.icr.io
|
||||
IMAGE_NAME: iks-test
|
||||
IKS_CLUSTER: example-iks-cluster-name-or-id
|
||||
DEPLOYMENT_NAME: iks-test
|
||||
PORT: 5001
|
||||
|
||||
jobs:
|
||||
setup-build-publish-deploy:
|
||||
name: Setup, Build, Publish, and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Download and Install IBM Cloud CLI
|
||||
- name: Install IBM Cloud CLI
|
||||
run: |
|
||||
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
|
||||
ibmcloud --version
|
||||
ibmcloud config --check-version=false
|
||||
ibmcloud plugin install -f kubernetes-service
|
||||
ibmcloud plugin install -f container-registry
|
||||
|
||||
# Authenticate with IBM Cloud CLI
|
||||
- name: Authenticate with IBM Cloud CLI
|
||||
run: |
|
||||
ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" -r "${IBM_CLOUD_REGION}" -g default
|
||||
ibmcloud cr region-set "${IBM_CLOUD_REGION}"
|
||||
ibmcloud cr login
|
||||
|
||||
# Build the Docker image
|
||||
- name: Build with Docker
|
||||
run: |
|
||||
docker build -t "$REGISTRY_HOSTNAME"/"$ICR_NAMESPACE"/"$IMAGE_NAME":"$GITHUB_SHA" \
|
||||
--build-arg GITHUB_SHA="$GITHUB_SHA" \
|
||||
--build-arg GITHUB_REF="$GITHUB_REF" .
|
||||
|
||||
# Push the image to IBM Container Registry
|
||||
- name: Push the image to ICR
|
||||
run: |
|
||||
docker push $REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA
|
||||
|
||||
# Deploy the Docker image to the IKS cluster
|
||||
- name: Deploy to IKS
|
||||
run: |
|
||||
ibmcloud ks cluster config --cluster $IKS_CLUSTER
|
||||
kubectl config current-context
|
||||
kubectl create deployment $DEPLOYMENT_NAME --image=$REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA --dry-run -o yaml > deployment.yaml
|
||||
kubectl apply -f deployment.yaml
|
||||
kubectl rollout status deployment/$DEPLOYMENT_NAME
|
||||
kubectl create service loadbalancer $DEPLOYMENT_NAME --tcp=80:$PORT --dry-run -o yaml > service.yaml
|
||||
kubectl apply -f service.yaml
|
||||
kubectl get services -o wide
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
name: iOS starter workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Test default scheme using any available iPhone simulator
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set Default Scheme
|
||||
run: |
|
||||
scheme_list=$(xcodebuild -list -json | tr -d "\n")
|
||||
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
|
||||
echo $default | cat >default
|
||||
echo Using default scheme: $default
|
||||
- name: Build
|
||||
env:
|
||||
scheme: ${{ 'default' }}
|
||||
platform: ${{ 'iOS Simulator' }}
|
||||
run: |
|
||||
device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
|
||||
if [ $scheme = default ]; then scheme=$(cat default); fi
|
||||
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
|
||||
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
|
||||
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
|
||||
- name: Test
|
||||
env:
|
||||
scheme: ${{ 'default' }}
|
||||
platform: ${{ 'iOS Simulator' }}
|
||||
run: |
|
||||
device=`instruments -s -devices | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
|
||||
if [ $scheme = default ]; then scheme=$(cat default); fi
|
||||
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
|
||||
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
|
||||
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
|
||||
+16
-20
@@ -1,20 +1,16 @@
|
||||
name: Jekyll site CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the site in the jekyll/builder container
|
||||
run: |
|
||||
docker run \
|
||||
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
|
||||
jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
|
||||
name: Jekyll site CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build the site in the jekyll/builder container
|
||||
run: |
|
||||
docker run \
|
||||
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
|
||||
jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
|
||||
|
||||
+3
-14
@@ -1,29 +1,18 @@
|
||||
name: Laravel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
laravel-tests:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
|
||||
with:
|
||||
php-version: '8.0'
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
- name: Copy .env
|
||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||
- name: Install Dependencies
|
||||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
||||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
||||
- name: Generate key
|
||||
run: php artisan key:generate
|
||||
- name: Directory Permissions
|
||||
run: chmod -R 777 storage bootstrap/cache
|
||||
- name: Create Database
|
||||
run: |
|
||||
mkdir -p database
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
|
||||
|
||||
name: Maven Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
- name: Publish to GitHub Packages Apache Maven
|
||||
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
+17
-24
@@ -1,24 +1,17 @@
|
||||
# This workflow will build a Java project with Maven
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
name: Java CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
name: MSBuild
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
# Path to the solution file relative to the root of the project.
|
||||
SOLUTION_FILE_PATH: .
|
||||
|
||||
# Configuration type to build.
|
||||
# You can convert this to a build matrix if you need coverage of multiple configuration types.
|
||||
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
BUILD_CONFIGURATION: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Restore NuGet packages
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
# Add additional options to the MSBuild command line here (like platform or verbosity level).
|
||||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
|
||||
+26
-30
@@ -1,30 +1,26 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x, 15.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
name: Node CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
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
|
||||
env:
|
||||
CI: true
|
||||
|
||||
+5
-7
@@ -1,6 +1,3 @@
|
||||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||
|
||||
name: Node.js Package
|
||||
|
||||
on:
|
||||
@@ -11,7 +8,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
@@ -22,7 +19,7 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
@@ -36,11 +33,12 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: $registry-url(npm)
|
||||
registry-url: https://npm.pkg.github.com/
|
||||
scope: '@your-github-username'
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
### The OpenShift Starter workflow will:
|
||||
# - Checkout your repository
|
||||
# - Perform a Docker build
|
||||
# - Push the built image to an image registry
|
||||
# - Log in to your OpenShift cluster
|
||||
# - Create an OpenShift app from the image and expose it to the internet.
|
||||
|
||||
### Before you begin:
|
||||
# - Have write access to a container image registry such as quay.io or Dockerhub.
|
||||
# - Have access to an OpenShift cluster.
|
||||
# - For instructions to get started with OpenShift see https://www.openshift.com/try
|
||||
# - The project you wish to add this workflow to should have a Dockerfile.
|
||||
# - If you don't have a Dockerfile at the repository root, see the buildah-build step.
|
||||
# - Builds from scratch are also available, but require more configuration.
|
||||
|
||||
### To get the workflow running:
|
||||
# 1. Add this workflow to your repository.
|
||||
# 2. Edit the top-level 'env' section, which contains a list of environment variables that must be configured.
|
||||
# 3. Create the secrets referenced in the 'env' section under your repository Settings.
|
||||
# 4. Edit the 'branches' in the 'on' section to trigger the workflow on a push to your branch.
|
||||
# 5. Commit and push your changes.
|
||||
|
||||
# For a more sophisticated example, see https://github.com/redhat-actions/spring-petclinic/blob/main/.github/workflows/petclinic-sample.yaml
|
||||
# Also see our GitHub organization, https://github.com/redhat-actions/
|
||||
|
||||
name: OpenShift
|
||||
|
||||
# ⬇️ Modify the fields marked with ⬇️ to fit your project, and create any secrets that are referenced.
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
|
||||
env:
|
||||
# ⬇️ EDIT with your registry and registry path.
|
||||
REGISTRY: quay.io/<username>
|
||||
# ⬇️ EDIT with your registry username.
|
||||
REGISTRY_USER: <username>
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
# ⬇️ EDIT to log into your OpenShift cluster and set up the context.
|
||||
# See https://github.com/redhat-actions/oc-login#readme for how to retrieve these values.
|
||||
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }}
|
||||
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
|
||||
|
||||
# ⬇️ EDIT with the port your application should be accessible on.
|
||||
APP_PORT: 8080
|
||||
|
||||
# ⬇️ EDIT if you wish to set the kube context's namespace after login. Leave blank to use the default namespace.
|
||||
OPENSHIFT_NAMESPACE: ""
|
||||
|
||||
# If you wish to manually provide the APP_NAME and TAG, set them here, otherwise they will be auto-detected.
|
||||
APP_NAME: ""
|
||||
TAG: ""
|
||||
|
||||
on:
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
||||
push:
|
||||
# Edit to the branch(es) you want to build and deploy on each push.
|
||||
branches: [ $default-branch ]
|
||||
|
||||
jobs:
|
||||
openshift-ci-cd:
|
||||
name: Build and deploy to OpenShift
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Determine app name
|
||||
if: env.APP_NAME == ''
|
||||
run: |
|
||||
echo "APP_NAME=$(basename $PWD)" | tee -a $GITHUB_ENV
|
||||
|
||||
- name: Determine tag
|
||||
if: env.TAG == ''
|
||||
run: |
|
||||
echo "TAG=${GITHUB_SHA::7}" | tee -a $GITHUB_ENV
|
||||
|
||||
# https://github.com/redhat-actions/buildah-build#readme
|
||||
- name: Build from Dockerfile
|
||||
uses: redhat-actions/buildah-build@v1
|
||||
with:
|
||||
image: ${{ env.APP_NAME }}
|
||||
tag: ${{ env.TAG }}
|
||||
# If you don't have a dockerfile, see:
|
||||
# https://github.com/redhat-actions/buildah-build#building-from-scratch
|
||||
# Otherwise, point this to your Dockerfile relative to the repository root.
|
||||
dockerfiles: |
|
||||
./Dockerfile
|
||||
|
||||
# https://github.com/redhat-actions/push-to-registry#readme
|
||||
- name: Push to registry
|
||||
id: push-to-registry
|
||||
uses: redhat-actions/push-to-registry@v1
|
||||
with:
|
||||
image: ${{ env.APP_NAME }}
|
||||
tag: ${{ env.TAG }}
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USER }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
# The path the image was pushed to is now stored in ${{ steps.push-to-registry.outputs.registry-path }}
|
||||
|
||||
# oc-login works on all platforms, but oc must be installed first.
|
||||
# The GitHub Ubuntu runner already includes oc.
|
||||
# Otherwise, https://github.com/redhat-actions/oc-installer#readme is available.
|
||||
|
||||
# https://github.com/redhat-actions/oc-login#readme
|
||||
- name: Log in to OpenShift
|
||||
uses: redhat-actions/oc-login@v1
|
||||
with:
|
||||
openshift_server_url: ${{ env.OPENSHIFT_SERVER }}
|
||||
openshift_token: ${{ env.OPENSHIFT_TOKEN }}
|
||||
insecure_skip_tls_verify: true
|
||||
namespace: ${{ env.OPENSHIFT_NAMESPACE }}
|
||||
|
||||
# This step should create a deployment, service, and route to run your app and expose it to the internet.
|
||||
# Feel free to replace this with 'oc apply', 'helm install', or however you like to deploy your app.
|
||||
- name: Create and expose app
|
||||
run: |
|
||||
export IMAGE="${{ steps.push-to-registry.outputs.registry-path }}"
|
||||
export PORT=${{ env.APP_PORT }}
|
||||
|
||||
export SELECTOR="app=${{ env.APP_NAME }}"
|
||||
echo "SELECTOR=$SELECTOR" >> $GITHUB_ENV
|
||||
|
||||
set -x
|
||||
# Take down any old deployment
|
||||
oc delete all --selector="$SELECTOR"
|
||||
oc new-app --name $APP_NAME --docker-image="$IMAGE"
|
||||
|
||||
# Make sure the app port is exposed
|
||||
oc patch svc $APP_NAME -p "{ \"spec\": { \"ports\": [{ \"name\": \"$PORT-tcp\", \"port\": $PORT }] } }"
|
||||
oc expose service $APP_NAME --port=$PORT
|
||||
|
||||
oc get all --selector="$SELECTOR"
|
||||
set +x
|
||||
|
||||
export ROUTE="$(oc get route $APP_NAME -o jsonpath='{.spec.host}')"
|
||||
echo "$APP_NAME is exposed at $ROUTE"
|
||||
echo "ROUTE=$ROUTE" >> $GITHUB_ENV
|
||||
|
||||
- name: View application route
|
||||
run: |
|
||||
[[ -n ${{ env.ROUTE }} ]] || (echo "Determining application route failed in previous step"; exit 1)
|
||||
echo "======================== Your application is available at: ========================"
|
||||
echo ${{ env.ROUTE }}
|
||||
echo "==================================================================================="
|
||||
echo
|
||||
echo "Your app can be taken down with: \"oc delete all --selector='${{ env.SELECTOR }}'\""
|
||||
+2
-16
@@ -1,10 +1,6 @@
|
||||
name: PHP Composer
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ $default-branch ]
|
||||
pull_request:
|
||||
branches: [ $default-branch ]
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -12,22 +8,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.composer-cache.outputs.cache-hit != 'true'
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Ada",
|
||||
"description": "Build Ada project with GPRbuild.",
|
||||
"iconName": "ada",
|
||||
"categories": ["Ada"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "Deploy to Alibaba Cloud ACK",
|
||||
"description": "Deploy a container to Alibaba Cloud Container Service for Kubernetes (ACK).",
|
||||
"creator": "Alibaba Cloud",
|
||||
"iconName": "alibabacloud",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Android CI",
|
||||
"description": "Build an Android project with Gradle.",
|
||||
"iconName": "android",
|
||||
"categories": ["Java", "Mobile"]
|
||||
}
|
||||
{
|
||||
"name": "Android CI",
|
||||
"description": "Build an Android project with Gradle.",
|
||||
"iconName": "android",
|
||||
"categories": ["Java", "Mobile"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Java with Ant",
|
||||
"description": "Build and test a Java project with Apache Ant.",
|
||||
"iconName": "ant",
|
||||
"categories": ["Ant", "Java"]
|
||||
}
|
||||
{
|
||||
"name": "Java with Ant",
|
||||
"description": "Build and test a Java project with Apache Ant.",
|
||||
"iconName": "ant",
|
||||
"categories": ["Ant", "Java"]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "ASP.NET Core",
|
||||
"description": "Build and test an ASP.NET Core project targeting .NET Core.",
|
||||
"iconName": "dotnetcore",
|
||||
"categories": ["ASP", "ASP.NET", ".NET"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "Deploy to Amazon ECS",
|
||||
"description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.",
|
||||
"creator": "Amazon Web Services",
|
||||
"iconName": "aws",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "Deploy Node.js to Azure Web App",
|
||||
"description": "Build a Node.js project and deploy it to an Azure Web App.",
|
||||
"creator": "Microsoft Azure",
|
||||
"iconName": "azure",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Simple workflow",
|
||||
"description": "Start with a file with the minimum necessary structure.",
|
||||
"iconName": "blank",
|
||||
"categories": null
|
||||
}
|
||||
{
|
||||
"name": "Simple workflow",
|
||||
"description": "Start with a file with the minimum necessary structure.",
|
||||
"iconName": "blank",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "C/C++ with Make",
|
||||
"description": "Build and test a C/C++ project using Make.",
|
||||
"iconName": "c-cpp",
|
||||
"categories": ["C", "C++"]
|
||||
}
|
||||
{
|
||||
"name": "C/C++ with Make",
|
||||
"description": "Build and test a C/C++ project using Make.",
|
||||
"iconName": "c-cpp",
|
||||
"categories": ["C", "C++"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Clojure",
|
||||
"description": "Build and test a Clojure project with Leiningen.",
|
||||
"iconName": "clojure",
|
||||
"categories": ["Clojure", "Java"]
|
||||
}
|
||||
{
|
||||
"name": "Clojure",
|
||||
"description": "Build and test a Clojure project with Leiningen.",
|
||||
"iconName": "clojure",
|
||||
"categories": ["Clojure", "Java"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "CMake based projects",
|
||||
"description": "Build and test a CMake based project.",
|
||||
"iconName": "cmake",
|
||||
"categories": ["C", "C++"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Crystal",
|
||||
"description": "Build and test a Crystal project.",
|
||||
"iconName": "crystal",
|
||||
"categories": ["Crystal"]
|
||||
}
|
||||
{
|
||||
"name": "Crystal",
|
||||
"description": "Build and test a Crystal project.",
|
||||
"iconName": "crystal",
|
||||
"categories": ["Crystal"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "D",
|
||||
"description": "Build and test a D project with dub.",
|
||||
"iconName": "d",
|
||||
"categories": [ "D" ]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Dart",
|
||||
"description": "Build and test a Dart project with Pub.",
|
||||
"iconName": "dart",
|
||||
"categories": ["Dart"]
|
||||
}
|
||||
{
|
||||
"name": "Dart",
|
||||
"description": "Build and test a Dart project with Pub.",
|
||||
"iconName": "dart",
|
||||
"categories": ["Dart"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Deno",
|
||||
"description": "Test your Deno project",
|
||||
"iconName": "deno",
|
||||
"categories": ["JavaScript", "TypeScript", "Deno"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Django",
|
||||
"description": "Build and Test a Django Project",
|
||||
"iconName": "django",
|
||||
"categories": ["Python", "Django"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Docker image",
|
||||
"description": "Build a Docker image to deploy, run, or push to a registry.",
|
||||
"iconName": "docker",
|
||||
"categories": ["Dockerfile"]
|
||||
}
|
||||
{
|
||||
"name": "Docker image",
|
||||
"description": "Build a Docker image to deploy, run, or push to a registry.",
|
||||
"iconName": "docker",
|
||||
"categories": ["Dockerfile"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Publish Docker Container",
|
||||
"description": "Build, test and push Docker image to GitHub Packages.",
|
||||
"iconName": "docker",
|
||||
"categories": ["Dockerfile"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": ".NET Desktop",
|
||||
"description": "Build, test, sign and publish a desktop application built on .NET.",
|
||||
"iconName": "dotnet",
|
||||
"categories": ["C#", "Visual Basic", "WPF", ".NET"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": ".NET",
|
||||
"description": "Build and test a .NET or ASP.NET Core project.",
|
||||
"iconName": "dotnet",
|
||||
"categories": ["C#", "F#", "Visual Basic", "ASP", "ASP.NET", ".NET"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Elixir",
|
||||
"description": "Build and test an Elixir project with Mix.",
|
||||
"iconName": "elixir",
|
||||
"categories": ["Elixir", "Erlang"]
|
||||
}
|
||||
{
|
||||
"name": "Elixir",
|
||||
"description": "Build and test an Elixir project with Mix.",
|
||||
"iconName": "elixir",
|
||||
"categories": ["Elixir", "Erlang"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Erlang",
|
||||
"description": "Build and test an Erlang project with rebar.",
|
||||
"iconName": "erlang",
|
||||
"categories": ["Erlang"]
|
||||
}
|
||||
{
|
||||
"name": "Erlang",
|
||||
"description": "Build and test an Erlang project with rebar.",
|
||||
"iconName": "erlang",
|
||||
"categories": ["Erlang"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Go",
|
||||
"description": "Build a Go project.",
|
||||
"iconName": "go",
|
||||
"categories": ["Go"]
|
||||
}
|
||||
{
|
||||
"name": "Go",
|
||||
"description": "Build a Go project.",
|
||||
"iconName": "go",
|
||||
"categories": ["Go"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "Build and Deploy to GKE",
|
||||
"description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.",
|
||||
"creator": "Google Cloud",
|
||||
"iconName": "googlegke",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Publish Java Package with Gradle",
|
||||
"description": "Build a Java Package using Gradle and publish to GitHub Packages.",
|
||||
"iconName": "gradle",
|
||||
"categories": ["Java", "Gradle"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Java with Gradle",
|
||||
"description": "Build and test a Java project using a Gradle wrapper script.",
|
||||
"iconName": "gradle",
|
||||
"categories": ["Java", "Gradle"]
|
||||
}
|
||||
{
|
||||
"name": "Gradle",
|
||||
"description": "Build and test a Java project using a Gradle wrapper script.",
|
||||
"iconName": "gradle",
|
||||
"categories": ["Java", "Gradle"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Haskell",
|
||||
"description": "Build and test a Haskell project with Cabal.",
|
||||
"iconName": "haskell",
|
||||
"categories": ["Haskell"]
|
||||
}
|
||||
{
|
||||
"name": "Haskell",
|
||||
"description": "Build and test a Haskell project with Cabal.",
|
||||
"iconName": "haskell",
|
||||
"categories": ["Haskell"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "Deploy to IBM Cloud Kubernetes Service",
|
||||
"description": "Build a docker container, publish it to IBM Cloud Container Registry, and deploy to IBM Cloud Kubernetes Service.",
|
||||
"creator": "IBM",
|
||||
"iconName": "ibm",
|
||||
"categories": null
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "iOS",
|
||||
"description": "Build and test an iOS application using xcodebuild and any available iPhone simulator.",
|
||||
"iconName": "xcode",
|
||||
"categories": [
|
||||
"iOS",
|
||||
"Xcode"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Jekyll",
|
||||
"description": "Package a Jekyll site using the jekyll/builder Docker image.",
|
||||
"iconName": "jekyll",
|
||||
"categories": ["HTML"]
|
||||
}
|
||||
{
|
||||
"name": "Jekyll",
|
||||
"description": "Package a Jekyll site using the jekyll/builder Docker image.",
|
||||
"iconName": "jekyll",
|
||||
"categories": ["HTML"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Publish Java Package with Maven",
|
||||
"description": "Build a Java Package using Maven and publish to GitHub Packages.",
|
||||
"iconName": "maven",
|
||||
"categories": ["Java", "Maven"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Java with Maven",
|
||||
"description": "Build and test a Java project with Apache Maven.",
|
||||
"iconName": "maven",
|
||||
"categories": ["Java", "Maven"]
|
||||
}
|
||||
{
|
||||
"name": "Maven",
|
||||
"description": "Build and test a Java project with Apache Maven.",
|
||||
"iconName": "maven",
|
||||
"categories": ["Java", "Maven"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "MSBuild based projects",
|
||||
"description": "Build a MSBuild based project.",
|
||||
"iconName": "c-cpp",
|
||||
"categories": ["C", "C++"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Node.js",
|
||||
"description": "Build and test a Node.js project with npm.",
|
||||
"iconName": "nodejs",
|
||||
"categories": ["JavaScript", "Node", "Npm"]
|
||||
}
|
||||
{
|
||||
"name": "Node.js",
|
||||
"description": "Build and test a Node.js project with npm.",
|
||||
"iconName": "nodejs",
|
||||
"categories": ["JavaScript", "TypeScript", "Node", "Npm"]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Publish Node.js Package",
|
||||
"description": "Publishes a Node.js package to npm and GitHub Packages.",
|
||||
"name": "Node.js Package",
|
||||
"description": "Publishes a Node.js package to npm and GitHub Package Registry.",
|
||||
"iconName": "node-package-transparent",
|
||||
"categories": ["JavaScript", "SDLC"]
|
||||
"categories": ["JavaScript", "TypeScript", "SDLC"]
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "OpenShift",
|
||||
"description": "Build a Docker-based project and deploy it to OpenShift.",
|
||||
"creator": "Red Hat",
|
||||
"iconName": "openshift",
|
||||
"categories": [ "Dockerfile" ]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Pylint",
|
||||
"description": "Lint a Python application with pylint.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Python application",
|
||||
"description": "Create and test a Python application.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
{
|
||||
"name": "Python application",
|
||||
"description": "Create and test a Python application.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "Python Package using Anaconda",
|
||||
"description": "Create and test a Python package on multiple Python versions using Anaconda for package management.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Python package",
|
||||
"description": "Create and test a Python package on multiple Python versions.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
{
|
||||
"name": "Python package",
|
||||
"description": "Create and test a Python package on multiple Python versions.",
|
||||
"iconName": "python",
|
||||
"categories": ["Python"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "R package",
|
||||
"description": "Create and test an R package on multiple R versions.",
|
||||
"iconName": "r",
|
||||
"categories": ["R"]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Ruby",
|
||||
"description": "Build and test a Ruby project with Rake.",
|
||||
"iconName": "ruby",
|
||||
"categories": ["Ruby"]
|
||||
}
|
||||
{
|
||||
"name": "Ruby",
|
||||
"description": "Build and test a Ruby project with Rake.",
|
||||
"iconName": "ruby",
|
||||
"categories": ["Ruby"]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user