移除无用脚本 #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
on: | |
workflow_dispatch: #github页面手动触发 | |
push: | |
tags: [ 'v*' ] | |
env: | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: jrohy/trojan | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Get latest tag | |
uses: oprypin/find-latest-tag@v1 | |
id: octokit # The step ID to refer to later. | |
with: | |
repository: ${{ github.repository }} # The repository to scan. | |
# https://github.com/docker/login-action | |
- name: Login | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# https://github.com/docker/build-push-action | |
- name: Build & Push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./asset/Dockerfile | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:${{ steps.octokit.outputs.tag }} | |
${{ env.IMAGE_NAME }}:latest |