update github actions #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 | |
github-release: | |
runs-on: ubuntu-latest | |
needs: [build-debian, build-centos] | |
steps: | |
- uses: actions/download-artifact@v4 | |
- run: cd artifact && md5sum *dhcpy6d* > md5sums.txt | |
- run: cd artifact && sha256sum *dhcpy6d* > sha256sums.txt | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
files: | | |
artifact/* |