restic/.gitea/workflows/release.yaml

35 lines
1.0 KiB
YAML
Raw Normal View History

2024-01-22 20:13:04 +00:00
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: |
2024-01-30 12:21:19 +00:00
source .env
docker build \
--build-arg="RESTIC_VERSION=${RESTIC_VERSION}" \
--build-arg="KUBECTL_VERSION=${KUBECTL_VERSION}" \
-t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${RESTIC_VERSION} \
-t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${RESTIC_VERSION}
2024-01-22 20:13:04 +00:00
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest