mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2024-11-16 03:45:23 +00:00
push to ghcr
This commit is contained in:
parent
48fe83b6b8
commit
5f19a51a9b
23
.github/workflows/builder.yaml
vendored
23
.github/workflows/builder.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
name: docker image builder
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -32,19 +33,35 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Lower case
|
- name: Login to GitHub Container Registry
|
||||||
id: string
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Lower case for Docker Hub
|
||||||
|
id: dh_string
|
||||||
uses: ASzc/change-string-case-action@v1
|
uses: ASzc/change-string-case-action@v1
|
||||||
with:
|
with:
|
||||||
string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
|
string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
|
||||||
|
|
||||||
|
- name: Lower case for ghcr
|
||||||
|
id: ghcr_string
|
||||||
|
uses: ASzc/change-string-case-action@v1
|
||||||
|
with:
|
||||||
|
string: ${{ github.event.repository.full_name }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/arm,linux/amd64,linux/arm64
|
platforms: linux/arm,linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.string.outputs.lowercase }}
|
tags: |
|
||||||
|
${{ steps.dh_string.outputs.lowercase }}
|
||||||
|
ghcr.io/${{ steps.ghcr_string.outputs.lowercase }}
|
||||||
|
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user