forked from askides/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.01 KB
/
docker-build.yml
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
32
33
34
35
36
37
38
39
40
41
42
name: Docker Image CI
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: "aurora"
steps:
- uses: actions/checkout@v2
- name: Set PROJECT_VERSION in ENV
run: |
echo "PROJECT_VERSION=$(git describe --abbrev=0 --tag)" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: |
itsrennyman/${{ env.PROJECT_NAME }}:latest
itsrennyman/${{ env.PROJECT_NAME }}:${{ env.PROJECT_VERSION }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}