forked from consuldemocracy/consuldemocracy
-
-
Notifications
You must be signed in to change notification settings - Fork 4
29 lines (24 loc) · 784 Bytes
/
docker.yml
File metadata and controls
29 lines (24 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Docker
on: [pull_request, workflow_dispatch, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build Dockerfile
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: false
- name: Login to docker registry
if: github.ref == 'refs/heads/main'
run: docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}
- name: Push to docker registry
if: github.ref == 'refs/heads/main'
run: docker push ${{ secrets.ORGANIZATION }}/${{ secrets.REPO }}:latest