mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-01 20:50:09 +02:00
34 lines
618 B
YAML
34 lines
618 B
YAML
name: Build and push Docker image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
|
|
# Enables BuildKit
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
# TODO: Change repository to the image's Docker repository name
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v0.1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
repository: myorg/myrepo
|
|
tag_with_ref: true
|
|
add_git_labels: true
|