-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (42 loc) · 1.27 KB
/
redis-cluster-proxy.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
35
36
37
38
39
40
41
42
43
44
45
---
# @see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Redis Cluster Proxy
on:
push:
branches:
- "master"
paths:
- test/proxy/redis-cluster-proxy/**
- .github/workflows/redis-cluster-proxy.yaml
defaults:
run:
shell: bash
jobs:
container-image:
name: Container Image
if: github.repository == 'redis-rb/redis-cluster-client'
timeout-minutes: 15
runs-on: ubuntu-latest
concurrency: redis-cluster-proxy
permissions:
packages: write
defaults:
run:
working-directory: test/proxy/redis-cluster-proxy
env:
IMAGE_NAME: redis-cluster-proxy
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Build image
run: |
docker build . --tag $IMAGE_NAME
- name: Log into GitHub Container Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image to GitHub Container Registry
run: |
IMAGE_ID=$(echo "ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME" | tr '[A-Z]' '[a-z]')
VERSION=latest
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION