Skip to content

Commit

Permalink
doc: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 22, 2022
1 parent d027a13 commit 62ee24b
Showing 1 changed file with 83 additions and 30 deletions.
113 changes: 83 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,44 +93,97 @@ jobs:
- run: echo "outputs.tag - ${{ needs.build.outputs.tag }}"

# Create Docker Image
- name: Create docker-compliant static resources.
run: npm run docker
- name: Set up Docker Buildx
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: Docker login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push image:latest
uses: docker/build-push-action@v3
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USER }}/tools:latest

- name: Build and push image:tags
uses: docker/build-push-action@v3
if: steps.create_tag.outputs.successful
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USER }}/tools:${{steps.changelog.outputs.version}}

- name: Build docs image
run: docker image build -t tools .
# Create Docker Image in Github
- name: Login to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tags & Push image(latest)
run: |
echo "outputs.tag - ${{ needs.build.outputs.version }}"
docker tag tools ${{ secrets.DOCKER_USER }}/tools:latest
docker push ${{ secrets.DOCKER_USER }}/tools:latest
- name: Build and push image:latest
uses: docker/build-push-action@v3
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ghcr.io/jaywcjlove/tools:latest

- name: Build and push image:tags
uses: docker/build-push-action@v3
if: steps.create_tag.outputs.successful
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ghcr.io/jaywcjlove/tools:${{steps.changelog.outputs.version}}

- name: Tags & Push image(tag)
if: needs.build.outputs.successful
run: |
echo "outputs.tag - ${{ needs.build.outputs.version }}"
docker tag tools ${{ secrets.DOCKER_USER }}/tools:${{needs.build.outputs.version}}
docker push ${{ secrets.DOCKER_USER }}/tools:${{needs.build.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/tools:latest .
# # Create Docker Image
# - name: Create docker-compliant static resources.
# run: npm run docker

- name: Publish to GitHub registry
run: docker push ghcr.io/jaywcjlove/tools:latest
# - name: Docker login
# run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: Tag docker image (beta) and publish to GitHub registry
if: needs.build.outputs.successful
run: |
echo "version: v${{ needs.build.outputs.version }}"
docker tag ghcr.io/jaywcjlove/tools:latest ghcr.io/jaywcjlove/tools:${{needs.build.outputs.version}}
docker push ghcr.io/jaywcjlove/tools:${{needs.build.outputs.version}}
# - name: Build docs image
# run: docker image build -t tools .

# - name: Tags & Push image(latest)
# run: |
# echo "outputs.tag - ${{ needs.build.outputs.version }}"
# docker tag tools ${{ secrets.DOCKER_USER }}/tools:latest
# docker push ${{ secrets.DOCKER_USER }}/tools:latest

# - name: Tags & Push image(tag)
# if: needs.build.outputs.successful
# run: |
# echo "outputs.tag - ${{ needs.build.outputs.version }}"
# docker tag tools ${{ secrets.DOCKER_USER }}/tools:${{needs.build.outputs.version}}
# docker push ${{ secrets.DOCKER_USER }}/tools:${{needs.build.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/tools:latest .

# - name: Publish to GitHub registry
# run: docker push ghcr.io/jaywcjlove/tools:latest

# - name: Tag docker image (beta) and publish to GitHub registry
# if: needs.build.outputs.successful
# run: |
# echo "version: v${{ needs.build.outputs.version }}"
# docker tag ghcr.io/jaywcjlove/tools:latest ghcr.io/jaywcjlove/tools:${{needs.build.outputs.version}}
# docker push ghcr.io/jaywcjlove/tools:${{needs.build.outputs.version}}


build_windows:
Expand Down

0 comments on commit 62ee24b

Please sign in to comment.