Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnaderi committed Nov 20, 2024
0 parents commit 7520bb6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Push Docker Images

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
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: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Read restic version
id: getversion
run: echo "::set-output name=version::$(grep -oP '(?<=restic/restic:)[\d\.]+' Dockerfile)"

- name: Print version
run: echo ${{ steps.getversion.outputs.version }}

- name: Build and push the image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/querateam/resticronic:${{ steps.getversion.outputs.version }}
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM restic/restic:0.17.3

RUN apk add --no-cache tzdata tini supercronic

ENTRYPOINT ["/sbin/tini", "--"]

0 comments on commit 7520bb6

Please sign in to comment.