-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.01 KB
/
redis-logger_ci.yaml
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
name: redis-logger ci
on:
push:
tags:
- v*-redis-logger
env:
img-registry: ghcr.io/h0n9
img-repository: redis-logger
img-tag: latest
jobs:
build-push:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.img-registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup img-tag
shell: bash
run: echo "img-tag=${GITHUB_REF_NAME/-redis-logger/''}" >> $GITHUB_ENV
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: redis-logger/
push: true
tags: ${{ env.img-registry }}/${{ env.img-repository }}:${{ env.img-tag }}
cache-from: type=gha,scope=redis-logger
cache-to: type=gha,mode=max,scope=redis-logger