47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Build and Push Docker Container
|
|
on:
|
|
schedule:
|
|
- cron: "0 11 * * 5"
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
- name: Build and push Docker image for latest tag
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: daniel156161/borgbackup-ssh:latest
|
|
platforms: linux/amd64
|
|
|
|
# Change to Brache archlinux
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: archlinux
|
|
|
|
- name: Build and push Docker image for archlinux tag
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: daniel156161/borgbackup-ssh:archlinux
|
|
platforms: linux/amd64
|