|
@@ -2,22 +2,43 @@ name: build
|
|
on:
|
|
on:
|
|
push:
|
|
push:
|
|
branches:
|
|
branches:
|
|
- - master
|
|
|
|
|
|
+ - master
|
|
paths-ignore:
|
|
paths-ignore:
|
|
- - .gitignore
|
|
|
|
- - README.md
|
|
|
|
- - '.github/ISSUE_TEMPLATE/**'
|
|
|
|
|
|
+ - .gitignore
|
|
|
|
+ - README.md
|
|
|
|
+ - '.github/ISSUE_TEMPLATE/**'
|
|
|
|
+ release:
|
|
|
|
+ types: [published]
|
|
|
|
+
|
|
jobs:
|
|
jobs:
|
|
build:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
steps:
|
|
- - name: Checkout Source
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- - name: Docker Login
|
|
|
|
- run: docker login -u germey -p ${{ secrets.DOCKERHUB_LOGIN_PASSWORD }}
|
|
|
|
- - name: Build the Docker Image
|
|
|
|
- run: docker-compose -f build.yaml build
|
|
|
|
- - name: Tag and Push Master Version
|
|
|
|
- run: |
|
|
|
|
- docker push germey/proxypool:master
|
|
|
|
-
|
|
|
|
|
|
+ - name: Checkout
|
|
|
|
+ uses: actions/checkout@v2
|
|
|
|
+
|
|
|
|
+ - name: Set up QEMU
|
|
|
|
+ uses: docker/setup-qemu-action@v1
|
|
|
|
+
|
|
|
|
+ - name: Set up Docker Buildx
|
|
|
|
+ uses: docker/setup-buildx-action@v1
|
|
|
|
+
|
|
|
|
+ - name: Login to DockerHub
|
|
|
|
+ uses: docker/login-action@v1
|
|
|
|
+ with:
|
|
|
|
+ username: germey
|
|
|
|
+ password: ${{ secrets.DOCKERHUB_LOGIN_PASSWORD }}
|
|
|
|
+
|
|
|
|
+ - name: Extract branch name
|
|
|
|
+ id: branch
|
|
|
|
+ shell: bash
|
|
|
|
+ run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF##*/} | sed 's/master/latest/')"
|
|
|
|
+
|
|
|
|
+ - name: Build and push
|
|
|
|
+ uses: docker/build-push-action@v2
|
|
|
|
+ with:
|
|
|
|
+ context: .
|
|
|
|
+ push: true
|
|
|
|
+ platforms: linux/amd64
|
|
|
|
+ tags: |
|
|
|
|
+ germey/proxypool:${{ steps.branch.outputs.tag }}
|