-
Notifications
You must be signed in to change notification settings - Fork 428
56 lines (49 loc) · 1.92 KB
/
Copy pathoperator-docker-release.yml
File metadata and controls
56 lines (49 loc) · 1.92 KB
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
46
47
48
49
50
51
52
53
54
55
56
name: Release Production Stack Operator Docker Image
on:
push:
branches:
- main
paths:
- 'operator/**'
workflow_dispatch:
jobs:
release:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
# Login to GitHub Container Registry (GHCR)
- name: Login to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: docker.io
username: lmcache
password: ${{ secrets.LMCACHE_DOCKER_SECRET }}
- name: Build and push image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
context: operator
file: operator/Dockerfile
push: true
# Unstable build on every merge to main; chart version tags come from helm-release workflow
tags: |
ghcr.io/${{ github.repository }}/production-stack-operator:latest
ghcr.io/${{ github.repository }}/production-stack-operator:${{ github.sha }}
lmcache/production-stack-operator:latest
lmcache/production-stack-operator:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache,mode=max