forked from coinchimp/kaspool-payment
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (26 loc) · 988 Bytes
/
docker-image.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
name: Docker Push kaspool-payment image
on:
push:
env:
REGISTRY: ghcr.io
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Extract Branch Name
id: extract_branch
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" >> $GITHUB_ENV
- name: Docker Login
run: echo "${{ secrets.GB_KATPOOL_TOKEN }}" | docker login ${{ env.REGISTRY }} --username argonmining --password-stdin
- name: Docker Build
env:
IMAGE_NAME: ${{ github.repository }}:v2408.1b-${{ env.branch_name }}
run: docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} .
- name: Docker Push
env:
IMAGE_NAME: ${{ github.repository }}:v2408.1b-${{ env.branch_name }}
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}