Skip to content

Docker Image CI

Docker Image CI #588

Workflow file for this run

name: Docker Image CI
on:
schedule:
- cron: '0 */24 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare workspace
run: mkdir workspace
- name: Build the WireGuard tools (wg)
run: |
cat build-wg-tools.sh | docker run --rm -i -v="$PWD/workspace:/workspace" -w="/workspace" gcc:latest sh
ls ./workspace/wireguard-tools/src/wg
ls ./workspace/wireguard-tools/src/wg-quick/linux.bash
- name: Get version
id: getver
run: echo "::set-output name=body::`./workspace/wireguard-tools/src/wg --version | head -n 1 | cut -d ' ' -f 2`"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.getver.outputs.body }}
release_name: Release ${{ steps.getver.outputs.body }}
body: Binary build for Linux system with amd64 architecture.
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset-1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./workspace/wireguard-tools/src/wg
asset_name: wg
asset_content_type: application/octet-stream
- name: Upload Release Asset
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./workspace/wireguard-tools/src/wg-quick/linux.bash
asset_name: linux.bash
asset_content_type: text/plain