parent
79c91d71c8
commit
c980dfe434
6 changed files with 48 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
name: Debian and RPM Package Builders
|
||||
name: Debian Packages
|
||||
permissions: read-all
|
||||
on:
|
||||
push:
|
||||
|
@ -7,9 +7,9 @@ on:
|
|||
pull_request:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
test-debian-packages:
|
||||
test-packages:
|
||||
if: github.event.pull_request
|
||||
name: Test Debian Packages
|
||||
name: Test Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -28,9 +28,9 @@ jobs:
|
|||
run: make debian-packages
|
||||
- name: List generated files
|
||||
run: ls -l *.deb
|
||||
publish-debian-packages:
|
||||
publish-packages:
|
||||
if: ${{ ! github.event.pull_request }}
|
||||
name: Publish Debian Packages
|
||||
name: Publish Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -53,31 +53,3 @@ jobs:
|
|||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
||||
test-rpm-package:
|
||||
if: github.event.pull_request
|
||||
name: Test RPM Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
publish-rpm-package:
|
||||
if: ${{ ! github.event.pull_request }}
|
||||
name: Publish RPM Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
- name: Upload package to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -10,6 +10,7 @@ on:
|
|||
jobs:
|
||||
test-docker-images:
|
||||
if: github.event.pull_request
|
||||
name: Test Images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -35,6 +36,7 @@ jobs:
|
|||
|
||||
publish-docker-images:
|
||||
if: ${{ ! github.event.pull_request }}
|
||||
name: Publish Images
|
||||
permissions:
|
||||
packages: write
|
||||
runs-on: ubuntu-latest
|
||||
|
|
37
.github/workflows/rpm_packages.yml
vendored
Normal file
37
.github/workflows/rpm_packages.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: RPM Packages
|
||||
permissions: read-all
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
jobs:
|
||||
test-package:
|
||||
if: github.event.pull_request
|
||||
name: Test Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
publish-package:
|
||||
if: ${{ ! github.event.pull_request }}
|
||||
name: Publish Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build RPM Package
|
||||
run: make rpm
|
||||
- name: List generated files
|
||||
run: ls -l *.rpm
|
||||
- name: Upload package to repository
|
||||
env:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|
|
@ -1,4 +1,4 @@
|
|||
name: CI Workflow
|
||||
name: Tests
|
||||
permissions: read-all
|
||||
|
||||
on:
|
2
Makefile
2
Makefile
|
@ -43,7 +43,7 @@ export PGPASSWORD := postgres
|
|||
debian-packages
|
||||
|
||||
miniflux:
|
||||
@ go build -buildmode=pie -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
@ CGO_ENABLED=0 go build -buildmode=pie -ldflags=$(LD_FLAGS) -o $(APP) main.go
|
||||
|
||||
linux-amd64:
|
||||
@ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=$(LD_FLAGS) -o $(APP)-$@ main.go
|
||||
|
|
|
@ -4,8 +4,8 @@ ADD . /go/src/app
|
|||
WORKDIR /go/src/app
|
||||
RUN make miniflux
|
||||
|
||||
FROM rockylinux:8
|
||||
RUN dnf install -y rpm-build
|
||||
FROM rockylinux:9
|
||||
RUN dnf install -y rpm-build systemd
|
||||
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
RUN echo "%_topdir /root/rpmbuild" >> .rpmmacros
|
||||
COPY --from=build /go/src/app/miniflux /root/rpmbuild/SOURCES/miniflux
|
||||
|
|
Loading…
Reference in a new issue