Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2381a40

Browse files
committed
feat(ci): generate release from github action and update changelog
1 parent8f011fe commit2381a40

File tree

3 files changed

+82
-17
lines changed

3 files changed

+82
-17
lines changed

‎.github/workflows/publish.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name:publish
2+
3+
on:
4+
release:
5+
types:[published]
6+
7+
env:
8+
TEST_TAG:ghcr.io/immobiliare/peephole:test
9+
LATEST_TAG:ghcr.io/immobiliare/peephole:latest
10+
NEW_TAG:ghcr.io/immobiliare/peephole:${{ github.event.release.tag_name }}
11+
12+
jobs:
13+
publish:
14+
runs-on:ubuntu-latest
15+
steps:
16+
-uses:actions/checkout@v4
17+
-uses:docker/setup-qemu-action@v3
18+
-uses:docker/setup-buildx-action@v3
19+
-uses:docker/login-action@v3
20+
with:
21+
registry:ghcr.io
22+
username:${{ github.repository_owner }}
23+
password:${{ secrets.GH_SRE_TOKEN }}
24+
-name:Build and export to Docker
25+
uses:docker/build-push-action@v5
26+
with:
27+
context:.
28+
load:true
29+
tags:${{ env.TEST_TAG }}
30+
-name:Test Docker Image
31+
run:|
32+
docker run --rm ${{ env.TEST_TAG }}
33+
-name:Build and push Docker Image
34+
uses:docker/build-push-action@v5
35+
with:
36+
context:.
37+
tags:${{ env.NEW_TAG }}, ${{ env.LATEST_TAG }}
38+
push:true

‎.github/workflows/release.yml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name:Create release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
changelog:
8+
name:Create changelog
9+
runs-on:ubuntu-latest
10+
11+
steps:
12+
-name:Checkout code
13+
uses:actions/checkout@v4
14+
15+
-name:Conventional Changelog Action
16+
id:changelog
17+
uses:TriPSs/conventional-changelog-action@v5
18+
with:
19+
preset:conventionalcommits
20+
github-token:${{ secrets.GH_SRE_TOKEN }}
21+
git-user-name:${{ github.actor }}
22+
git-user-email:${{ github.actor }}@users.noreply.github.com
23+
tag-prefix:''
24+
input-file:'.github/CHANGELOG.md'
25+
output-file:'.github/CHANGELOG.md'
26+
release-count:10000
27+
skip-on-empty:false
28+
skip-version-file:true
29+
30+
-name:Create Release
31+
uses:softprops/action-gh-release@v1
32+
if:${{ steps.changelog.outputs.skipped == 'false' }}
33+
with:
34+
tag_name:${{ steps.changelog.outputs.tag }}
35+
body:${{ steps.changelog.outputs.clean_changelog }}
36+
token:${{ secrets.GH_SRE_TOKEN }}

‎.github/workflows/test.yml‎

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,16 @@ jobs:
4141
if:success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
4242
runs-on:ubuntu-latest
4343
steps:
44-
-name:Checkout repository
45-
uses:actions/checkout@v4
46-
with:
47-
submodules:recursive
48-
-name:Set up QEMU
49-
uses:docker/setup-qemu-action@v3
50-
-name:Set up Docker Buildx
51-
uses:docker/setup-buildx-action@v3
52-
-name:Login to DockerHub
53-
uses:docker/login-action@v3
44+
-uses:actions/checkout@v4
45+
-uses:docker/setup-qemu-action@v3
46+
-uses:docker/setup-buildx-action@v3
47+
-uses:docker/login-action@v3
5448
with:
5549
registry:ghcr.io
5650
username:${{ github.repository_owner }}
57-
password:${{ secrets.GH_ACTIONS_PEEPHOLE }}
58-
-name:Build and push
59-
id:docker_build
60-
uses:docker/build-push-action@v2
51+
password:${{ secrets.GH_SRE_TOKEN }}
52+
-uses:docker/build-push-action@v5
6153
with:
54+
context:.
55+
tags:ghcr.io/immobiliare/peephole:next
6256
push:true
63-
tags:ghcr.io/immobiliare/peephole:latest
64-
-name:Image digest
65-
run:echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp