Update deploy.sh script to use systemctl instead of service for proxy… #173
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: Update | |
on: | |
push: | |
branches: [ "master","feature/low-level","feature/low-level-timed","tmp_hyper1" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
REGISTRY_USER: arloor | |
IMAGE_REGISTRY: docker.io | |
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | |
GH_TOKEN: ${{ github.token }} | |
jobs: | |
update_release_and_push_images: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT | |
- name: build | |
run: | | |
cargo build --release | |
- name: gihub_release | |
run: | | |
cp target/release/rust_http_proxy target/release/rust_http_proxy_linux; | |
gh release delete-asset v1.0.0 rust_http_proxy_linux -y; | |
gh release upload v1.0.0 target/release/rust_http_proxy_linux; | |
- name: push | |
run: | | |
podman build -f Dockerfile . -t docker.io/arloor/rust_http_proxy:${{ steps.vars.outputs.sha_short }} -t docker.io/arloor/rust_http_proxy:latest | |
podman login docker.io -u arloor -p ${{ env.REGISTRY_PASSWORD }} | |
podman push docker.io/arloor/rust_http_proxy:${{ steps.vars.outputs.sha_short }} | |
podman push docker.io/arloor/rust_http_proxy:latest | |
# - name: install ssh keys | |
# run: | | |
# install -m 600 -D /dev/null ~/.ssh/id_rsa | |
# echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
# ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts | |
# - name: connect and pull | |
# run: ssh root@${{ secrets.SSH_HOST }} "kubectl set image ds proxy proxy=docker.io/arloor/rust_http_proxy:${{ github.sha }}" | |
# - name: cleanup | |
# run: rm -rf ~/.ssh |