Skip to content

Commit

Permalink
Create docker-dev.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardkkt authored May 23, 2020
1 parent b751a0d commit 3297bce
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3297bce

Please sign in to comment.