Lowercase image name and app name change #5
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: Deploy on release | ||
on: | ||
push: | ||
branches: | ||
- java-deployment | ||
release: | ||
types: [published] | ||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ghcr.io/${{ github.repository_owner.toLowerCase() }}/wiq_es04b:latest | ||
Check failure on line 32 in .github/workflows/release.yml GitHub Actions / Deploy on releaseInvalid workflow file
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build-and-push | ||
steps: | ||
- name: Deploy over SSH | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
username: ${{ secrets.DEPLOY_USER }} | ||
key: ${{ secrets.DEPLOY_KEY }} | ||
script: | | ||
cd ~/app | ||
# Or use cd $HOME/app if preferred | ||
wget https://raw.githubusercontent.com/${{ github.repository }}/master/docker-compose.yml -O docker-compose.yml | ||
wget https://raw.githubusercontent.com/${{ github.repository }}/master/.env -O .env | ||
docker-compose down | ||
docker-compose up -d |