-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 983 Bytes
/
dev.build.yml
File metadata and controls
36 lines (29 loc) · 983 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
32
33
34
35
36
name: Build dev image
on:
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker-image-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Extract commit SHA
run:
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build --pull --build-arg COM_SHA=${{ env.SHORT_SHA }} -t ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.SHORT_SHA }} -f ./datafeed-cache-server/Dockerfile .
docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.SHORT_SHA }}