mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-05-05 01:55:52 +00:00
45 lines
1,017 B
YAML
45 lines
1,017 B
YAML
name: CI Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- .github/docker/ci/Dockerfile
|
|
- .github/workflows/ci-image.yml
|
|
schedule:
|
|
- cron: '0 3 1 * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
|
|
jobs:
|
|
build-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- id: img
|
|
env:
|
|
REPO: ${{ github.repository }}
|
|
run: echo "image=ghcr.io/${REPO,,}/ci:latest" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .github/docker/ci
|
|
push: true
|
|
tags: ${{ steps.img.outputs.image }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|