Skip to content

Commit 583cc4a

Browse files
authored
Merge pull request #6 from CodeShellDev/dev
Update Main Branch
2 parents 1ce396f + a5cc105 commit 583cc4a

File tree

3 files changed

+30
-117
lines changed

3 files changed

+30
-117
lines changed
Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,18 @@
11
name: Build & Push Dev Image
22

33
on:
4-
push:
5-
branches:
6-
- dev
7-
8-
env:
9-
USERNAME: ${{ github.repository_owner }}
10-
IMAGE_NAME: ${{ github.repository }}
11-
REGISTRY: ghcr.io
4+
release:
5+
types: [published]
126

137
jobs:
148
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
9+
uses: codeshelldev/gh-actions/.github/workflows/docker-image.yaml@main
10+
with:
11+
registry: ghcr.io
12+
flavor: |
13+
latest=false
14+
tags: |
15+
type=sha
16+
type=raw,value=latest-dev
17+
secrets:
18+
GH_PCKG_TOKEN: ${{ secrets.GH_PCKG_TOKEN }}

.github/workflows/docker-image.yml

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,17 @@ 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{{version}}
42-
type=semver,pattern=v{{major}}
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.yaml@main
10+
with:
11+
registry: ghcr.io
12+
flavor: |
13+
latest=false
14+
tags: |
15+
type=semver,pattern=v{{major}}
16+
type=semver,pattern=v{{version}}
17+
type=semver,pattern=v{{major}}.{{minor}}
18+
type=semver,pattern=latest
19+
secrets:
20+
GH_PCKG_TOKEN: ${{ secrets.GH_PCKG_TOKEN }}

.github/workflows/readme-update.yml

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

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

0 commit comments

Comments
 (0)