Initial custom container build
Build restic container / Build image (push) Failing after 1m46s
Details
Build restic container / Build image (push) Failing after 1m46s
Details
This commit is contained in:
parent
3ff69f4027
commit
8e988192e2
|
@ -0,0 +1,31 @@
|
||||||
|
name: Build restic container
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: restic
|
||||||
|
REGISTRY: git.namesny.com
|
||||||
|
REPO_OWNER: cluster
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.namesny.com
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
run: |
|
||||||
|
VERSION=$(cat VERSION)
|
||||||
|
docker build --build-arg="RESTIC_VERSION=${VERSION}" -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
||||||
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION}
|
||||||
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM alpine:3
|
||||||
|
|
||||||
|
ARG RESTIC_VERSION
|
||||||
|
|
||||||
|
RUN apk add restic=${RESTIC_VERSION} --no-cache
|
||||||
|
ENTRYPOINT ["/usr/bin/restic"]
|
||||||
|
CMD ["--help"]
|
Loading…
Reference in New Issue