runner-ubuntu-custom/.gitea/workflows/release.yml

45 lines
1.3 KiB
YAML
Raw Normal View History

2025-01-02 16:17:00 +01:00
on:
push:
branches:
- main
2025-01-02 16:33:46 +01:00
schedule:
2025-01-03 17:22:25 +01:00
- cron: "@weekly"
2025-01-02 16:17:00 +01:00
jobs:
2025-01-02 17:21:13 +01:00
release:
2025-01-02 16:17:00 +01:00
runs-on: ubuntu-latest
steps:
2025-01-02 17:13:08 +01:00
- name: Update Docker configuration
continue-on-error: true
run: |
mkdir -p /etc/default
mkdir -p /etc/docker
touch -a /etc/default/docker
touch -a /etc/docker/daemon.json
echo "DOCKER_OPTS=\"--insecure-registry ${{ vars.PACKAGES_REGISTRY_URL }}\"" >> /etc/default/docker
echo "{\"insecure-registries\": [\"${{ vars.PACKAGES_REGISTRY_URL }}\"]}" > /etc/docker/daemon.json
2025-01-02 17:06:25 +01:00
2025-01-02 16:17:00 +01:00
- name: Check out repository code
2025-01-02 16:29:22 +01:00
uses: actions/checkout@v4.2.2
2025-01-02 16:17:00 +01:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2025-01-02 17:21:13 +01:00
- name: Log in to Gitea Package Registry
2025-01-02 17:26:38 +01:00
uses: docker/login-action@v3
with:
registry: ${{ vars.PACKAGES_REGISTRY_URL }}
username: ${{ vars.PACKAGES_REGISTRY_USERNAME }}
password: ${{ secrets.PACKAGES_REGISTRY_PASSWORD }}
2025-01-02 16:17:00 +01:00
2025-01-02 17:21:13 +01:00
- name: Build image
2025-01-02 17:26:38 +01:00
uses: docker/build-push-action@v6
with:
context: .
push: false
2025-01-03 17:22:25 +01:00
load: true
2025-01-02 17:26:38 +01:00
tags: ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest
2025-01-03 17:22:25 +01:00
2025-01-02 17:21:13 +01:00
- name: Push image
run: docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest