Skip to content

Publish theflashback docker image #70

Publish theflashback docker image

Publish theflashback docker image #70

Workflow file for this run

name: Publish theflashback docker image
# Controls when the workflow will run
on:
# Trigger the workflow on push
# but only for the master branch
push:
branches:
- master
# runs once every month
schedule:
- cron: "0 3 1 * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
push_to_registry:
name: Push theflashback docker images to GitHub Packages
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
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: Build and push theflashback docker
uses: docker/build-push-action@v6
with:
push: true
target: theflashback-deploy
tags: |
ghcr.io/jimmylevell/theflashback/theflashback:latest
-
name: Deploy to swarm
uses: wshihadeh/docker-deployment-action@v2
with:
remote_docker_host: [email protected]
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-swarm
copy_stack_file: true
pull_images_first: true
deploy_path: /home/worker/levell/theflashback
stack_file_name: docker-compose.prod.yml
keep_files: 2
args: --with-registry-auth --prune theflashback