2020-08-15 20:50:47 +08:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
2020-10-29 00:03:15 +08:00
|
|
|
workflow_dispatch:
|
2020-10-24 00:09:50 +08:00
|
|
|
schedule:
|
|
|
|
- cron: '0 10 * * *' # everyday at 10am
|
2020-08-15 20:50:47 +08:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2020-10-24 00:09:50 +08:00
|
|
|
dockerhub:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-10-24 00:09:50 +08:00
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2020-08-15 21:36:37 +08:00
|
|
|
|
2020-11-19 01:47:48 +08:00
|
|
|
ecr:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Login to ECR
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
registry: ${{ secrets.AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
|
|
|
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
|
|
|
|
ecr-aws-creds:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-16.04
|
|
|
|
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: ${{ secrets.AWS_REGION }}
|
|
|
|
-
|
|
|
|
name: Login to ECR
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
registry: ${{ secrets.AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
|
2020-10-24 00:09:50 +08:00
|
|
|
|
2020-12-17 18:06:17 +08:00
|
|
|
ecr-public:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-16.04
|
2020-08-15 21:36:37 +08:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-08-15 21:36:37 +08:00
|
|
|
-
|
2020-12-17 18:06:17 +08:00
|
|
|
name: Login to Public ECR
|
2020-08-15 21:36:37 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-12-17 18:06:17 +08:00
|
|
|
registry: public.ecr.aws
|
|
|
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
env:
|
|
|
|
AWS_REGION: ${{ secrets.AWS_REGION }}
|
2020-10-24 00:09:50 +08:00
|
|
|
|
2020-12-17 18:06:17 +08:00
|
|
|
ecr-public-aws-creds:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-16.04
|
2020-10-24 00:09:50 +08:00
|
|
|
steps:
|
2020-08-15 21:36:37 +08:00
|
|
|
-
|
2020-10-24 00:09:50 +08:00
|
|
|
name: Checkout
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-10-24 00:09:50 +08:00
|
|
|
-
|
2020-12-17 18:06:17 +08:00
|
|
|
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: ${{ secrets.AWS_REGION }}
|
|
|
|
-
|
|
|
|
name: Login to Public ECR
|
2020-10-24 00:09:50 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-12-17 18:06:17 +08:00
|
|
|
registry: public.ecr.aws
|
2020-08-15 21:36:37 +08:00
|
|
|
|
2020-12-17 18:06:17 +08:00
|
|
|
github-package:
|
2020-10-24 00:09:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: actions/checkout@v2
|
2020-10-24 00:09:50 +08:00
|
|
|
-
|
2020-12-17 18:06:17 +08:00
|
|
|
name: Login to GitHub Package Registry
|
2020-10-24 00:09:50 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-12-17 18:06:17 +08:00
|
|
|
registry: docker.pkg.github.com
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2020-10-24 00:09:50 +08:00
|
|
|
|
2020-12-17 18:06:17 +08:00
|
|
|
github-container:
|
2020-11-19 01:47:48 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
2020-12-17 18:06:17 +08:00
|
|
|
name: Login to GitHub Package Registry
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-12-17 18:06:17 +08:00
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ secrets.GHCR_USERNAME }}
|
|
|
|
password: ${{ secrets.GHCR_PAT }}
|
2020-11-19 01:47:48 +08:00
|
|
|
|
2020-12-17 18:06:17 +08:00
|
|
|
gitlab:
|
2020-11-19 01:47:48 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
2020-12-17 18:06:17 +08:00
|
|
|
name: Login to GitLab
|
2020-11-19 01:47:48 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-12-17 18:06:17 +08:00
|
|
|
registry: registry.gitlab.com
|
|
|
|
username: ${{ secrets.GITLAB_USERNAME }}
|
|
|
|
password: ${{ secrets.GITLAB_TOKEN }}
|
|
|
|
|
|
|
|
# google-artifact:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# -
|
|
|
|
# name: Checkout
|
|
|
|
# uses: actions/checkout@v2
|
|
|
|
# -
|
|
|
|
# name: Login to Google Artifact Registry
|
|
|
|
# uses: ./
|
|
|
|
# with:
|
|
|
|
# registry: ${{ secrets.GAR_LOCATION }}-docker.pkg.dev
|
|
|
|
# username: _json_key
|
|
|
|
# password: ${{ secrets.GAR_JSON_KEY }}
|
|
|
|
#
|
|
|
|
# google-container:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# -
|
|
|
|
# name: Checkout
|
|
|
|
# uses: actions/checkout@v2
|
|
|
|
# -
|
|
|
|
# name: Login to Google Container Registry
|
|
|
|
# uses: ./
|
|
|
|
# with:
|
|
|
|
# registry: gcr.io
|
|
|
|
# username: _json_key
|
|
|
|
# password: ${{ secrets.GCR_JSON_KEY }}
|