Files
DDNS/.github/workflows/docker-github.yml
T
2020-08-03 19:02:46 +08:00

41 lines
1.1 KiB
YAML

name: Github Docker
on:
push:
branches:
- master
- dev
- edge
pull_request:
branches:
- master
jobs:
docker-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and push Docker images to test docker
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v1.1.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: newfuture/ddns/preview-ddns
tag_with_ref: true
add_git_labels: true
- name: Build and push Docker images to release docker
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v1.1.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: newfuture/ddns/ddns
tag_with_ref: true
add_git_labels: true