mirror of https://github.com/docker/docs.git
ci: update github actions accordingly to the new dockerfile
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
ebd36f7081
commit
75cb114327
|
@ -6,25 +6,27 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-static-page:
|
build:
|
||||||
name: build
|
runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-18.04
|
if: github.repository == 'docker/docker.github.io'
|
||||||
timeout-minutes: 10
|
|
||||||
env:
|
|
||||||
DOCKER_BUILDKIT: '1'
|
|
||||||
steps:
|
steps:
|
||||||
- name: print docker info
|
-
|
||||||
run: docker version && docker info
|
name: Checkout
|
||||||
- uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: build current docs
|
-
|
||||||
run: docker build --target=deploy-source --output=./_site .
|
name: Build
|
||||||
- name: upload files to S3 bucket
|
uses: docker/bake-action@v2
|
||||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-stage-us-east-1/ --delete
|
with:
|
||||||
|
targets: release
|
||||||
|
-
|
||||||
|
name: Upload files to S3 bucket
|
||||||
|
run: |
|
||||||
|
aws s3 sync --acl public-read _site s3://docs.docker.com-stage-us-east-1/ --delete
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: update S3 website config
|
name: Update S3 website config
|
||||||
uses: ./.github/actions/update-website-config
|
uses: ./.github/actions/update-website-config
|
||||||
with:
|
with:
|
||||||
bucketName: docs.docker.com-stage-us-east-1
|
bucketName: docs.docker.com-stage-us-east-1
|
||||||
|
@ -33,16 +35,16 @@ jobs:
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: invalidate docs website cache
|
name: Invalidate docs website cache
|
||||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator response.json
|
run: |
|
||||||
|
aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-stage-cache-invalidator response.json
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: send slack notification
|
name: Send Slack notification
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully promoted docs-stage from master. https://docs-stage.docker.com/"}' $SLACK
|
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully promoted docs-stage from master. https://docs-stage.docker.com/"}' $SLACK
|
||||||
env:
|
env:
|
||||||
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
|
||||||
|
|
|
@ -3,29 +3,31 @@ name: build docker image when PR is opened
|
||||||
on: pull_request
|
on: pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-static-page:
|
build:
|
||||||
name: build
|
runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
env:
|
|
||||||
DOCKER_BUILDKIT: '1'
|
|
||||||
steps:
|
steps:
|
||||||
- name: print docker info
|
-
|
||||||
run: docker version && docker info
|
name: Checkout
|
||||||
- uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: build image
|
-
|
||||||
run: docker build --target=current -t documentation:latest .
|
name: Build
|
||||||
|
uses: docker/bake-action@v2
|
||||||
|
with:
|
||||||
|
targets: release
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
name: validate links
|
runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
env:
|
|
||||||
DOCKER_BUILDKIT: '1'
|
|
||||||
steps:
|
steps:
|
||||||
- name: print docker info
|
-
|
||||||
run: docker version && docker info
|
name: Checkout
|
||||||
- uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: copy files to host
|
-
|
||||||
run: docker build --target=deploy-source --output=./_site .
|
name: Build
|
||||||
- name: check for broken links
|
uses: docker/bake-action@v2
|
||||||
|
with:
|
||||||
|
targets: release
|
||||||
|
-
|
||||||
|
name: Check for broken links
|
||||||
uses: chabad360/htmlproofer@master
|
uses: chabad360/htmlproofer@master
|
||||||
with:
|
with:
|
||||||
directory: ./_site
|
directory: ./_site
|
||||||
|
|
|
@ -6,25 +6,29 @@ on:
|
||||||
- published
|
- published
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-static-page:
|
build:
|
||||||
name: build
|
runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-18.04
|
if: github.repository == 'docker/docker.github.io'
|
||||||
timeout-minutes: 10
|
|
||||||
env:
|
|
||||||
DOCKER_BUILDKIT: '1'
|
|
||||||
steps:
|
steps:
|
||||||
- name: print docker info
|
-
|
||||||
run: docker version && docker info
|
name: Checkout
|
||||||
- uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: build current docs
|
-
|
||||||
run: docker build --build-arg JEKYLL_ENV=production --target=deploy-source --output=./_site .
|
name: Build
|
||||||
- name: upload files to S3 bucket
|
uses: docker/bake-action@v2
|
||||||
run: aws s3 sync --acl public-read _site s3://docs.docker.com-us-east-1/ --delete
|
with:
|
||||||
|
targets: release
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: production
|
||||||
|
-
|
||||||
|
name: Upload files to S3 bucket
|
||||||
|
run: |
|
||||||
|
aws s3 sync --acl public-read _site s3://docs.docker.com-us-east-1/ --delete
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: update S3 website config
|
name: Update S3 website config
|
||||||
uses: ./.github/actions/update-website-config
|
uses: ./.github/actions/update-website-config
|
||||||
with:
|
with:
|
||||||
bucketName: docs.docker.com-us-east-1
|
bucketName: docs.docker.com-us-east-1
|
||||||
|
@ -32,17 +36,17 @@ jobs:
|
||||||
websiteConfig: _website-config-docs.json
|
websiteConfig: _website-config-docs.json
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: invalidate docs website cache
|
name: Invalidate docs website cache
|
||||||
run: aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-cache-invalidator response.json
|
run: |
|
||||||
|
aws --region us-east-1 lambda invoke --function-name arn:aws:lambda:us-east-1:710015040892:function:docs-cache-invalidator response.json
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
-
|
||||||
- name: send slack notification
|
name: Send Slack notification
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $SLACK
|
curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $SLACK
|
||||||
env:
|
env:
|
||||||
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
SLACK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
if: github.repository == 'docker/docker.github.io' && github.event_name == 'push'
|
|
||||||
|
|
Loading…
Reference in New Issue