update ci docker publish
This commit is contained in:
parent
6f5d6c6079
commit
ae20bb3eae
1 changed files with 58 additions and 36 deletions
94
.github/workflows/main.yml
vendored
94
.github/workflows/main.yml
vendored
|
|
@ -16,25 +16,48 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
# -
|
||||||
name: Set up QEMU
|
# name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
# uses: docker/setup-qemu-action@v3
|
||||||
-
|
# -
|
||||||
name: Set up Docker Buildx
|
# name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
# uses: docker/setup-buildx-action@v3
|
||||||
-
|
# -
|
||||||
name: Login to DockerHub
|
# name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
# password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
# -
|
||||||
|
# name: Login to GitHub Container Registry
|
||||||
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# registry: ghcr.io
|
||||||
|
# username: ${{ github.repository_owner }}
|
||||||
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
-
|
|
||||||
name: Login to GitHub Container Registry
|
# - name: Extract metadata (tags, labels) for Docker
|
||||||
uses: docker/login-action@v3
|
# id: meta
|
||||||
|
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
|
# with:
|
||||||
|
# images: jingle3276/metube
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
id: push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
context: .
|
||||||
username: ${{ github.repository_owner }}
|
file: ./Dockerfile
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ secrets.DOCKERHUB_REPOSITORY }}:latest
|
||||||
|
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|
@ -43,23 +66,22 @@ jobs:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_REPOSITORY }}:latest
|
jingle3276/metube:latest
|
||||||
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ steps.date.outputs.date }}
|
jingle3276/metube:${{ steps.date.outputs.date }}
|
||||||
ghcr.io/${{ github.repository }}:latest
|
|
||||||
ghcr.io/${{ github.repository }}:${{ steps.date.outputs.date }}
|
|
||||||
|
|
||||||
dockerhub-sync-readme:
|
|
||||||
needs: dockerhub-build-push
|
# dockerhub-sync-readme:
|
||||||
runs-on: ubuntu-latest
|
# needs: dockerhub-build-push
|
||||||
steps:
|
# runs-on: ubuntu-latest
|
||||||
- name: Sync README
|
# steps:
|
||||||
uses: docker://lsiodev/readme-sync:latest
|
# - name: Sync README
|
||||||
env:
|
# uses: docker://lsiodev/readme-sync:latest
|
||||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
# env:
|
||||||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
# DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
GIT_REPOSITORY: ${{ github.repository }}
|
# DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
DOCKER_REPOSITORY: ${{ secrets.DOCKERHUB_REPOSITORY }}
|
# GIT_REPOSITORY: ${{ github.repository }}
|
||||||
GIT_BRANCH: master
|
# DOCKER_REPOSITORY: ${{ secrets.DOCKERHUB_REPOSITORY }}
|
||||||
with:
|
# GIT_BRANCH: master
|
||||||
entrypoint: node
|
# with:
|
||||||
args: /opt/docker-readme-sync/sync
|
# entrypoint: node
|
||||||
|
# args: /opt/docker-readme-sync/sync
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue