Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: F1Widget
on:
push:
branches:
- main
- 'feature/**'
env:
version: '1.0.${{ github.run_number }}'
tag: ${{ github.ref_name == 'main' && 'latest' || github.run_number }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/feedarr:${{ env.tag }}
${{ secrets.DOCKERHUB_USERNAME }}/feedarr:${{ github.run_number }}
ghcr.io/${{ github.actor }}/feedarr:${{ env.tag }}
ghcr.io/${{ github.actor }}/feedarr:${{ github.run_number }}
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: /home/sboulema/deployDockerContainer F1Widget