diff --git a/.github/workflows/docker-dev.yml b/.github/workflows/docker-dev.yml new file mode 100644 index 0000000..edbf4d6 --- /dev/null +++ b/.github/workflows/docker-dev.yml @@ -0,0 +1,58 @@ +name: Docker Image CI + +on: + push: + branches: [ dev ] + pull_request: + branches: [ dev ] + +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: true + prerelease: true + - 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