Skip to content

Commit

Permalink
Auto build and push r3 image to ghcr (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Superskyyy authored Nov 7, 2023
1 parent fe7748d commit 82d574a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
pull_request:
push:
branches:
- master
- main
schedule:
- cron: '0 18 * * *'

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2023 SkyAPM org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: publish-docker

on:
push:
branches:
- main
release:
types:
- released

jobs:
build-docker:
# if: github.repository == 'SkyAPM/R3'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion models/uri_drain/uri_drain.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def create_template(self, seq1, seq2):
# /api/getconnection
# /api/dropconnection
if seq_length == 2:
if (seq1[0] == seq2[0] and seq1[1] != seq2[1] # can be simplified
if (seq1[0] == seq2[0] and seq1[1] != seq2[1] # can be simplified
and not self.has_numbers(seq1[1]) and not self.has_numbers(seq2[1])):
print(f'first token match but second token mismatch, seq1 = {seq1}, seq2 = {seq2}')
return 'rejected'
Expand Down
2 changes: 1 addition & 1 deletion tools/grpc_gen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 SkyAPM org
# Copyright 2023 SkyAPM org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 82d574a

Please sign in to comment.