mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 21:16:38 +00:00
The workflow should work for forks also
This commit is contained in:
parent
a904d60ad8
commit
4bc510bdad
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
@ -34,7 +34,10 @@ jobs:
|
||||
- name: Run Django tests
|
||||
run: cd tubesync && python3 manage.py test --verbosity=2
|
||||
containerise:
|
||||
if: ${{ always() }}
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@ -42,13 +45,18 @@ jobs:
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Log into GitHub Container Registry
|
||||
run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
env:
|
||||
DOCKER_REGISTRY: https://ghcr.io
|
||||
DOCKER_USERNAME: ${{ github.actor }}
|
||||
DOCKER_TOKEN: ${{ 'meeb' == github.repository_owner && secrets.REGISTRY_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
run: echo '${{ env.DOCKER_TOKEN }}' | docker login --password-stdin --username '${{ env.DOCKER_USERNAME }}' '${{ env.DOCKER_REGISTRY }}'
|
||||
- name: Lowercase github username for ghcr
|
||||
id: string
|
||||
uses: ASzc/change-string-case-action@v6
|
||||
with:
|
||||
string: ${{ github.actor }}
|
||||
- name: Build and push
|
||||
timeout-minutes: 60
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
Loading…
Reference in New Issue
Block a user