Skip to content

Commit 9f9d41c

Browse files
committed
fix: dockerfile
1 parent 0b0dac4 commit 9f9d41c

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

.github/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: write-all
9+
10+
env:
11+
DOCKER_PATH: ./docker
12+
DOCKER_IMAGE: 36node/mysql-backup
13+
HARBOR_REPO: common
14+
CHART_NAME: mysql-backup-chart
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
release-please:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
release_created: ${{ steps.release.outputs.release_created }}
25+
tag_name: ${{ steps.release.outputs.tag_name }}
26+
steps:
27+
- uses: googleapis/release-please-action@v4
28+
id: release
29+
with:
30+
release-type: simple
31+
32+
docker-and-helm:
33+
needs: release-please
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Get version tag
39+
id: get_tag
40+
# needs.release-please.outputs.tag_name = v1.0.0
41+
run: echo "VERSION=$(echo "${{ needs.release-please.outputs.tag_name }}" | cut -c 1-)" >> $GITHUB_OUTPUT
42+
- name: Print tag1
43+
run: echo "tag=${{ steps.get_tag.outputs.VERSION }}"
44+
- name: Print tag2
45+
run: |
46+
TAG=$(echo "${{ steps.get_tag.outputs.VERSION }}" | sed 's/v\([0-9.]*\).*/\1/')
47+
echo "tag2=$TAG"

.github/workflows/release-please.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
release_created: ${{ steps.release.outputs.release_created }}
2525
tag_name: ${{ steps.release.outputs.tag_name }}
2626
steps:
27-
- uses: google-github-actions/release-please-action@v4
27+
- uses: googleapis/release-please-action@v4
2828
id: release
2929
with:
3030
release-type: simple
@@ -39,14 +39,13 @@ jobs:
3939
- name: Get version tag
4040
id: get_tag
4141
# needs.release-please.outputs.tag_name = v1.0.0
42-
run: echo ::set-output name=VERSION::$(echo "${{ needs.release-please.outputs.tag_name }}" | cut -c 2-)
42+
run: echo "VERSION=$(echo "${{ needs.release-please.outputs.tag_name }}" | cut -c 2-)" >> $GITHUB_OUTPUT
4343
- name: Docker meta
4444
id: meta
4545
uses: docker/metadata-action@v5
4646
with:
4747
images: |
4848
${{ env.DOCKER_IMAGE }}
49-
# steps.get_tag.outputs.VERSION = v1.0.0
5049
tags: |
5150
${{ steps.get_tag.outputs.VERSION }}
5251
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

0 commit comments

Comments
 (0)