Skip to content

github actions

github actions #102

name: build-release-latest
on:
push:
tags-ignore: 'v*'
branches: '**'
env:
release: stable
repo_dir: dhcpy6d-jekyll/docs/repo
jobs:
build-debian:
runs-on: ubuntu-latest
env:
dist: debian
steps:
# get source
- uses: actions/checkout@v4
# build container image for package creation
- run: /usr/bin/docker build -t build-${{ github.job }} -f build/Dockerfile-${{ env.dist }} .
# make entrypoints executable
- run: chmod +x build/*.sh
# execute container with matching entrypoint
- run: |
/usr/bin/docker run --volume ${{ github.workspace }}:/dhcpy6d \
--volume ${{ github.workspace }}/build/entrypoint-${{ github.job }}.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
build-${{ github.job }}
# upload results
- uses: actions/upload-artifact@v4
with:
path: ./*.deb
retention-days: 1
name: ${{ github.job }}
build-centos:
runs-on: ubuntu-latest
env:
dist: centos
steps:
# get source
- uses: actions/checkout@v4
# build container image for package creation
- run: /usr/bin/docker build -t build-${{ github.job }} -f build/Dockerfile-${{ env.dist }} .
# make entrypoints executable
- run: chmod +x build/*.sh
# execute container with matching entrypoint
- run: |
/usr/bin/docker run --volume ${{ github.workspace }}:/dhcpy6d \
--volume ${{ github.workspace }}/build/entrypoint-${{ github.job }}.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
build-${{ github.job }}
# upload results
- uses: actions/upload-artifact@v4
with:
path: ./*.rpm
retention-days: 1
name: ${{ github.job }}
github-release:
runs-on: ubuntu-latest
needs: [build-debian, build-centos]
steps:
- uses: actions/download-artifact@v4
- run: md5sum build-debian/*dhcpy6d* > md5sums.txt
- run: md5sum build-centos/*dhcpy6d* >> md5sums.txt
- run: sha256sum build-debian/*dhcpy6d* > sha256sums.txt
- run: sha256sum build-centos/*dhcpy6d* >> sha256sums.txt
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
files: |
build-debian/*
build-centos/*
*sums.txt