Skip to content

Refactor CI workflow to remove Docker image build and push steps #39

Refactor CI workflow to remove Docker image build and push steps

Refactor CI workflow to remove Docker image build and push steps #39

Workflow file for this run

name: Build, Publish Docker Image, and Release Binaries
on:
push:
branches:
- release
jobs:
build-and-release-binaries:

Check failure on line 9 in .github/workflows/Ci.yml

View workflow run for this annotation

GitHub Actions / Build, Publish Docker Image, and Release Binaries

Invalid workflow file

The workflow is not valid. .github/workflows/Ci.yml (Line: 9, Col: 3): The workflow must contain at least one job with no dependencies.
runs-on: ubuntu-latest
needs: build-and-push-docker-image
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev perl
- name: Set up Rust
uses: actions/setup-rust@v1
with:
rust-version: stable
- name: Install cross
run: cargo install cross
- name: Build Linux binary
run: |
cross build --target x86_64-unknown-linux-gnu --release
mkdir -p build/linux
cp target/x86_64-unknown-linux-gnu/release/easy-proxy build/linux/
- name: Build macOS binary
run: |
cross build --target x86_64-apple-darwin --release
mkdir -p build/macos
cp target/x86_64-apple-darwin/release/easy-proxy build/macos/
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: "Release ${{ github.sha }}"
draft: false
prerelease: false
- name: Upload Linux Binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/linux/easy-proxy
asset_name: easy-proxy-linux
asset_content_type: application/octet-stream
- name: Upload macOS Binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/macos/easy-proxy
asset_name: easy-proxy-macos
asset_content_type: application/octet-stream