-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 1022 Bytes
/
Copy pathbuild-release.yml
File metadata and controls
30 lines (30 loc) · 1022 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
name: Release Build
on:
release:
types: [created]
jobs:
build:
name: Build and Publish Docker Image
runs-on: ubuntu-latest
strategy:
matrix: { project: ['dashboard', 'runner'] }
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Authenticate with Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Publish Image
uses: docker/build-push-action@v2
with:
context: ${{ matrix.project }}
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/candor-${{ matrix.project }}:${{ github.event.release.tag_name }}
${{ secrets.DOCKERHUB_USERNAME }}/candor-${{ matrix.project }}:latest
build-args: |
CANDOR_BUILD_VERSION=${{ github.event.release.tag_name }}
push: true