Skip to content

Commit

Permalink
fix: github-backup image
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Nov 26, 2024
1 parent fd50cbc commit dacd1bc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/github-backup.tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}-${{ github.event_name }}
jobs:
build:
uses: ./.github/workflows/workflow.build.yaml
secrets: inherit
with:
name: github-backup

version_test:
container: "docker://ghcr.io/socialgouv/docker/github-backup:sha-${{ github.sha }}"
name: Test files
needs: [build]
runs-on: ubuntu-latest
steps:
- run: git --version
name: "github-backup"
on:
push:
tags:
- "github-backup@**"
30 changes: 30 additions & 0 deletions .github/workflows/github-backup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.ref }}-${{ github.event_name }}
jobs:
build:
uses: ./.github/workflows/workflow.build.yaml
secrets: inherit
with:
name: github-backup

version_test:
container: "docker://ghcr.io/socialgouv/docker/github-backup:sha-${{ github.sha }}"
name: Test files
needs: [build]
runs-on: ubuntu-latest
steps:
- run: git --version
name: "github-backup"
on:
push:
branches:
- "**"
- "!master"
- "!alpha"
- "!beta"
paths:
- "github-backup/**"
- ".github/workflows/github-backup.yaml"
- ".github/workflows/github-backup.tag.yaml"
- ".github/workflows/workflow.build.yaml"
8 changes: 8 additions & 0 deletions github-backup/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM bitnami/python:3.10

RUN apt-get update && apt-get install -y git openssh-client && rm -rf /var/lib/apt/lists/*
RUN groupadd -g 1000 user && useradd -u 1000 -r -g user -m -d /home/user user

USER 1000

RUN pip install github-backup

0 comments on commit dacd1bc

Please sign in to comment.