Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: build tag and version error
  • Loading branch information
DVKunion committed Apr 2, 2024
commit a1247a231217d376d3178afd95eb5a9ac54725a5
2 changes: 1 addition & 1 deletion .github/conf/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ builds:
- 6
- 7
ldflags:
- -s -w -X github.com/DVKunion/SeaMoon/system/xlog.Version={{.Version}} -X github.com/DVKunion/SeaMoon/system/xlog.Commit={{.ShortCommit}}
- -s -w -X github.com/DVKunion/SeaMoon/pkg/system/xlog.Version={{.Version}} -X github.com/DVKunion/SeaMoon/pkg/system/xlog.Commit={{.ShortCommit}}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
run: |
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.ALIYUN_USERNAME }}:${{ secrets.ALIYUN_PASSWORD }} docker.io/dvkunion/seamoon:${{github.ref_name}} ${{ matrix.registry }}/${{ matrix.repo }}
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.ALIYUN_USERNAME }}:${{ secrets.ALIYUN_PASSWORD }} docker.io/dvkunion/seamoon:latest ${{ matrix.registry }}/${{ matrix.repo }}

package-tencent:
name: package-tecent
runs-on: ubuntu-20.04
Expand All @@ -65,12 +64,19 @@ jobs:
uswccr.ccs.tencentyun.com
]
repo: [seamoon]
include:
- registry: ccr.ccs.tencentyun.com
repo: [dvkunion]
steps:
- uses: actions/checkout@v4
- name: skopeo-copy
run: |
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.TENCENT_USERNAME }}:${{ secrets.TENCENT_PASSWORD }} docker.io/dvkunion/seamoon:${{github.ref_name}} ${{ matrix.registry }}/${{ matrix.repo }}
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.TENCENT_USERNAME }}:${{ secrets.TENCENT_PASSWORD }} docker.io/dvkunion/seamoon:latest ${{ matrix.registry }}/${{ matrix.repo }}
package-tencent-inbound:
name: package-tecent-inbound
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: skopeo-copy
run: |
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.TENCENT_USERNAME }}:${{ secrets.TENCENT_PASSWORD }} docker.io/dvkunion/seamoon:${{github.ref_name}} ccr.ccs.tencentyun.com/dvkunion
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.TENCENT_USERNAME }}:${{ secrets.TENCENT_PASSWORD }} docker.io/dvkunion/seamoon:latest ccr.ccs.tencentyun.com/dvkunion
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /src
ENV CGO_ENABLED 0
ENV VERSION=${VERSION}
ENV SHA=${SHA}
RUN go build -v -ldflags "-X github.com/DVKunion/SeaMoon/system/xlog.Version=${VERSION} -X github.com/DVKunion/SeaMoon/system/xlog.Commit=${SHA}" -o /tmp/seamoon cmd/main.go
RUN go build -v -ldflags "-X github.com/DVKunion/SeaMoon/pkg/system/xlog.Version=${VERSION} -X github.com/DVKunion/SeaMoon/pkg/system/xlog.Commit=${SHA}" -o /tmp/seamoon cmd/main.go
RUN chmod +x /tmp/seamoon
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && \
apk add upx && upx -9 /tmp/seamoon
Expand Down