-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (42 loc) · 1.15 KB
/
image-agent.yaml
File metadata and controls
44 lines (42 loc) · 1.15 KB
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
43
name: 'Build Image: agent'
on:
push:
paths:
- 'images/agent/**'
- '!images/agent/readme.md'
- 'tsconfig.json'
- 'defaults.env'
- 'bin/**'
- 'src/**'
- '!src/**.spec.**'
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get tag
run: |
echo "::set-output name=commit::$(git rev-parse --short HEAD)"
id: get_tag
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build, tag, push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: images/agent/Dockerfile
push: true
tags: chaingraph/agent:latest,chaingraph/agent:${{ steps.get_tag.outputs.commit }}
- name: Echo image digest
run: echo ${{ steps.docker_build.outputs.digest }}