setting up sync from Gitea to GitHub, and making Docker Push reuseable.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: docker
|
||||
name: Push Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -31,8 +31,8 @@ jobs:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
digitaladapt/tock:latest
|
||||
digitaladapt/tock:${{ github.ref_name }}
|
||||
${{ vars.DOCKERHUB_TARGET }}:latest
|
||||
${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}
|
||||
|
||||
- name: Build php image
|
||||
uses: docker/build-push-action@v5
|
||||
@@ -42,5 +42,5 @@ jobs:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
digitaladapt/tock:latest-php
|
||||
digitaladapt/tock:${{ github.ref_name }}-php
|
||||
${{ vars.DOCKERHUB_TARGET }}:latest-php
|
||||
${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}-php
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Sync GitHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Andrew Sync"
|
||||
git config --global user.email "sync@digitaladapt.com"
|
||||
|
||||
- name: Add GitHub Remote
|
||||
env:
|
||||
SYNC_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }}
|
||||
SYNC_TARGET: ${{ vars.SYNC_GITHUB_TARGET }}
|
||||
run: |
|
||||
git remote add github "https://digitaladapt:${SYNC_TOKEN}@github.com/$SYNC_TARGET"
|
||||
|
||||
- name: Push Current Branch
|
||||
run: |
|
||||
git push github HEAD:${GITHUB_REF_NAME}
|
||||
|
||||
- name: Push Tags
|
||||
run: |
|
||||
git push github --tags
|
||||
|
||||
Reference in New Issue
Block a user