doc: update workflows config. #454
This commit is contained in:
parent
73c14bb511
commit
adc9c47463
|
|
@ -127,39 +127,90 @@ jobs:
|
||||||
npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
|
npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json
|
||||||
|
|
||||||
# Create Docker Image
|
# Create Docker Image
|
||||||
- name: Docker login
|
- name: Set up Docker Buildx
|
||||||
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build linux-command image
|
- name: Build and push image:latest
|
||||||
run: |
|
uses: docker/build-push-action@v3
|
||||||
rm -rf .deploy/linux-command.docset.tgz
|
with:
|
||||||
docker image build -t linux-command .
|
push: true
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ secrets.DOCKER_USER }}/linux-command:latest
|
||||||
|
|
||||||
- name: Tags & Push image(latest)
|
- name: Build and push image:tags
|
||||||
run: |
|
uses: docker/build-push-action@v3
|
||||||
docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:latest
|
|
||||||
docker push ${{ secrets.DOCKER_USER }}/linux-command:latest
|
|
||||||
|
|
||||||
- name: Tags & Push image
|
|
||||||
if: steps.create_tag.outputs.successful
|
if: steps.create_tag.outputs.successful
|
||||||
run: |
|
with:
|
||||||
echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
|
push: true
|
||||||
docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}}
|
context: .
|
||||||
docker push ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}}
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}}
|
||||||
|
|
||||||
# Create Docker Image in Github
|
# Create Docker Image in Github
|
||||||
- name: Login to GitHub registry
|
- name: Login to the GitHub Container Registry
|
||||||
run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build and push image:latest
|
||||||
run: docker build -t ghcr.io/jaywcjlove/linux-command:latest .
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ghcr.io/jaywcjlove/linux-command:latest
|
||||||
|
|
||||||
- name: Publish to GitHub registry
|
- name: Build and push image:tags
|
||||||
run: docker push ghcr.io/jaywcjlove/linux-command:latest
|
uses: docker/build-push-action@v3
|
||||||
|
|
||||||
- name: Tag docker image (beta) and publish to GitHub registry
|
|
||||||
if: steps.create_tag.outputs.successful
|
if: steps.create_tag.outputs.successful
|
||||||
run: |
|
with:
|
||||||
echo "version: v${{ steps.changelog.outputs.version }}"
|
push: true
|
||||||
docker tag ghcr.io/jaywcjlove/linux-command:latest ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}}
|
context: .
|
||||||
docker push ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}}
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}}
|
||||||
|
|
||||||
|
# # Create Docker Image
|
||||||
|
# - name: Docker login
|
||||||
|
# run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
# - name: Build linux-command image
|
||||||
|
# run: |
|
||||||
|
# rm -rf .deploy/linux-command.docset.tgz
|
||||||
|
# docker image build -t linux-command .
|
||||||
|
|
||||||
|
# - name: Tags & Push image(latest)
|
||||||
|
# run: |
|
||||||
|
# docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:latest
|
||||||
|
# docker push ${{ secrets.DOCKER_USER }}/linux-command:latest
|
||||||
|
|
||||||
|
# - name: Tags & Push image
|
||||||
|
# if: steps.create_tag.outputs.successful
|
||||||
|
# run: |
|
||||||
|
# echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
|
||||||
|
# docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}}
|
||||||
|
# docker push ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}}
|
||||||
|
|
||||||
|
# # Create Docker Image in Github
|
||||||
|
# - name: Login to GitHub registry
|
||||||
|
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
# - name: Build docker image
|
||||||
|
# run: docker build -t ghcr.io/jaywcjlove/linux-command:latest .
|
||||||
|
|
||||||
|
# - name: Publish to GitHub registry
|
||||||
|
# run: docker push ghcr.io/jaywcjlove/linux-command:latest
|
||||||
|
|
||||||
|
# - name: Tag docker image (beta) and publish to GitHub registry
|
||||||
|
# if: steps.create_tag.outputs.successful
|
||||||
|
# run: |
|
||||||
|
# echo "version: v${{ steps.changelog.outputs.version }}"
|
||||||
|
# docker tag ghcr.io/jaywcjlove/linux-command:latest ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}}
|
||||||
|
# docker push ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}}
|
||||||
Loading…
Reference in New Issue