-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1015 Bytes
/
docker-push.yml
File metadata and controls
31 lines (31 loc) · 1015 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
30
31
name: Build and Push Docker Image
on:
push:
branches: ['main']
jobs:
push_to_registry:
name: Push Docker image to registries
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Log in to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Log in to Github CR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Push to registries
uses: docker/build-push-action@v2
with:
push: true
tags: |
clowder/generator:latest
clowder/generator:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/generator:latest
ghcr.io/${{ github.repository_owner }}/generator:${{ github.sha }}