Skip to content

Commit 3853480

Browse files
committed
update workflow
1 parent 334959e commit 3853480

File tree

3 files changed

+23
-115
lines changed

3 files changed

+23
-115
lines changed

.github/workflows/docker-image-dev.yml

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,18 @@ on:
44
push:
55
branches:
66
- dev
7-
8-
env:
9-
USERNAME: ${{ github.repository_owner }}
10-
IMAGE_NAME: ${{ github.repository }}
11-
REGISTRY: ghcr.io
7+
paths-ignore:
8+
- ".**"
129

1310
jobs:
1411
update:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout Repository
19-
uses: actions/checkout@v4
20-
21-
- name: Login to Registry
22-
uses: docker/login-action@v3
23-
with:
24-
registry: ${{ env.REGISTRY }}
25-
username: ${{ env.USERNAME }}
26-
password: ${{ secrets.GH_PCKG_TOKEN }}
27-
28-
- name: Setup QEMU
29-
uses: docker/setup-qemu-action@v3
30-
31-
- name: Setup Buildx
32-
uses: docker/setup-buildx-action@v3
33-
34-
- name: Extract Labels and Tags
35-
id: meta
36-
uses: docker/metadata-action@v5
37-
with:
38-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39-
flavor: |
40-
latest=false
41-
tags: |
42-
type=raw,value=latest-dev
43-
44-
- name: Build and Push Image
45-
uses: docker/build-push-action@v6
46-
with:
47-
context: .
48-
platforms: linux/amd64, linux/arm64
49-
tags: ${{ steps.meta.outputs.tags }}
50-
labels: ${{ steps.meta.outputs.labels }}
51-
push: true
12+
uses: codeshelldev/gh-actions/.github/workflows/docker-image.yml@main
13+
with:
14+
registry: ghcr.io
15+
flavor: |
16+
latest=false
17+
tags: |
18+
type=sha
19+
type=raw,value=latest-dev
20+
secrets:
21+
GH_PCKG_TOKEN: ${{ secrets.GH_PCKG_TOKEN }}

.github/workflows/docker-image.yml

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,10 @@ on:
44
release:
55
types: [published]
66

7-
env:
8-
USERNAME: ${{ github.repository_owner }}
9-
IMAGE_NAME: ${{ github.repository }}
10-
REGISTRY: ghcr.io
11-
127
jobs:
138
update:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- name: Checkout Repository
18-
uses: actions/checkout@v4
19-
20-
- name: Login to Registry
21-
uses: docker/login-action@v3
22-
with:
23-
registry: ${{ env.REGISTRY }}
24-
username: ${{ env.USERNAME }}
25-
password: ${{ secrets.GH_PCKG_TOKEN }}
26-
27-
- name: Setup QEMU
28-
uses: docker/setup-qemu-action@v3
29-
30-
- name: Setup Buildx
31-
uses: docker/setup-buildx-action@v3
32-
33-
- name: Extract Labels and Tags
34-
id: meta
35-
uses: docker/metadata-action@v5
36-
with:
37-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38-
flavor: |
39-
latest=false
40-
tags: |
41-
type=semver,pattern=v{{major}}
42-
type=semver,pattern=v{{version}}
43-
type=semver,pattern=v{{major}}.{{minor}}
44-
type=semver,pattern=latest
45-
46-
- name: Build and Push Image
47-
uses: docker/build-push-action@v6
48-
with:
49-
context: .
50-
platforms: linux/amd64, linux/arm64
51-
tags: ${{ steps.meta.outputs.tags }}
52-
labels: ${{ steps.meta.outputs.labels }}
53-
push: true
9+
uses: codeshelldev/gh-actions/.github/workflows/docker-image.yml@main
10+
with:
11+
registry: ghcr.io
12+
secrets:
13+
GH_PCKG_TOKEN: ${{ secrets.GH_PCKG_TOKEN }}

.github/workflows/readme-update.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,11 @@ name: Update README
33
on:
44
push:
55
paths:
6-
- "docker-compose.yaml"
7-
- ".github/templates/README.template.md"
8-
- "examples/*"
6+
- docker-compose.yaml
7+
- .github/templates/README.template.md
98

109
jobs:
11-
update-readme:
12-
runs-on: ubuntu-latest
13-
14-
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
17-
18-
- name: Replace File Placeholders in README
19-
run: |
20-
bash .github/helper-scripts/replace_placeholders.sh .github/templates/README.template.md README.md
21-
22-
- name: Commit & Push README.md
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
run: |
26-
git config user.name "github-actions[bot]"
27-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
28-
29-
git add README.md
30-
if git diff --cached --quiet; then
31-
echo "No changes to commit."
32-
else
33-
git commit -m "Update README.md"
34-
git push
35-
fi
10+
update:
11+
uses: codeshelldev/gh-actions/.github/workflows/readme-update.yml@main
12+
secrets:
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)