mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Merge cc31a100d2 into 2c007cfed7
This commit is contained in:
commit
d1cce63b7d
1 changed files with 55 additions and 0 deletions
55
.github/workflow/main.yml
vendored
Normal file
55
.github/workflow/main.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
name: CI Build and Upload
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
build-and-upload:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Check PR label
|
||||
id: check_label
|
||||
uses: actions/labeler@v2
|
||||
with:
|
||||
action: contains
|
||||
label: CI:TriggerBuild
|
||||
|
||||
- name: Tag with Branch
|
||||
id: image_tag
|
||||
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Check repository
|
||||
id: check_repo
|
||||
run: echo "::set-output name=repo::${{ github.event.pull_request.base.repo.name }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build Docker image
|
||||
id: build-image
|
||||
run: |
|
||||
docker buildx build -t my-golang-app .
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/386
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-ethereum:${{ env.BRANCH }}
|
||||
build-args: |
|
||||
BRANCH=${{ env.BRANCH }}
|
||||
Loading…
Reference in a new issue