Merge pull request #55 from SynixeContractors/dependabot/github_actio… #186
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: executor | |
on: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/executor.yaml | |
- Cargo.toml | |
- bin/executor/** | |
- lib/** | |
permissions: | |
packages: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Protoc | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y protobuf-compiler | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: executor | |
- run: cargo build --release | |
working-directory: ./bin/executor | |
- run: cp target/release/synixe-executor ./bin/executor/synixe-executor | |
- name: Build Image | |
working-directory: ./bin/executor | |
run: docker build . -t executor | |
- name: Tag Image | |
run: docker tag executor ghcr.io/synixecontractors/apps-executor:latest | |
- name: Push Image | |
run: docker push ghcr.io/synixecontractors/apps-executor:latest |