more ci fixes

This commit is contained in:
zk
2026-05-03 15:11:21 +01:00
parent 857ccee0bd
commit c04afbc755
12 changed files with 63 additions and 38 deletions
+6 -9
View File
@@ -20,16 +20,17 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Image name (lowercase for GHCR)
env:
OWNER_RAW: ${{ github.repository_owner }}
REPO: ${{ github.repository }}
run: |
OWNER="$(echo "$OWNER_RAW" | tr '[:upper:]' '[:lower:]')"
echo "GHBOT_IMAGE=ghcr.io/${OWNER}/tachi-ghbot" >> "$GITHUB_ENV"
REPO_LC="$(echo "$REPO" | tr '[:upper:]' '[:lower:]')"
echo "GHBOT_IMAGE=ghcr.io/${REPO_LC}-ghbot" >> "$GITHUB_ENV"
- name: Log in to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -42,7 +43,6 @@ jobs:
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Build and push
id: docker_build
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
@@ -56,15 +56,12 @@ jobs:
cache-from: type=gha,scope=${{ github.ref_name }}-github-bot
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-github-bot
- name: Image digest
run: echo "${{ steps.docker_build.outputs.digest }}"
deploy:
runs-on: ubuntu-latest
needs: [docker-push]
if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
steps:
- name: Enable SSH Key
- name: Enable SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}