forked from torilabs/ipsec-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 993 Bytes
/
docker-image-dev.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
name: build dev docker image
on:
pull_request:
branches: [ '*' ]
jobs:
build:
name: build-docker-image-dev
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
tag=$(echo "${{ github.ref }}" | cut -d "/" -f3)
sha="${{ github.sha }}"
echo "NEW_TAG=pr-${tag}-${sha}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: registry.cennso.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: registry.cennso.com/cennso-dev/ipsec-prometheus-exporter:${{ env.NEW_TAG }}