2020-03-21 00:51:30 +03:00
|
|
|
name: "Latest tag from master branch"
|
2020-03-21 00:04:10 +03:00
|
|
|
env:
|
|
|
|
DOCKERHUB_REPOSITORY: serjs/go-socks5-proxy
|
2020-03-20 23:03:48 +03:00
|
|
|
|
2020-03-21 00:51:30 +03:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: master
|
|
|
|
push:
|
|
|
|
branches: master
|
2023-03-13 02:06:25 +03:00
|
|
|
release:
|
|
|
|
types: [published, edited]
|
2020-03-21 00:51:30 +03:00
|
|
|
|
2020-03-21 00:49:31 +03:00
|
|
|
jobs:
|
2020-03-21 00:51:30 +03:00
|
|
|
hadolint:
|
|
|
|
name: hadolint
|
2020-03-21 00:49:31 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
2020-03-21 00:51:30 +03:00
|
|
|
- name: hadolint
|
2021-07-07 14:41:35 +03:00
|
|
|
uses: hadolint/hadolint-action@v1.5.0
|
2021-07-07 14:56:25 +03:00
|
|
|
with:
|
|
|
|
ignore: DL3018
|
2023-03-13 02:06:25 +03:00
|
|
|
docker:
|
2020-03-20 23:03:48 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2020-03-20 23:08:29 +03:00
|
|
|
uses: crazy-max/ghaction-docker-buildx@v1.1.0
|
2020-03-20 23:03:48 +03:00
|
|
|
-
|
|
|
|
name: Print builder available platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
2023-03-13 02:06:25 +03:00
|
|
|
-
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: serjs/go-socks5-proxy
|
|
|
|
tags: |
|
|
|
|
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{raw}}
|
2022-11-08 14:41:28 +03:00
|
|
|
-
|
|
|
|
name: Dockerhub login
|
2022-11-07 14:30:48 +03:00
|
|
|
uses: docker/login-action@v2
|
2023-03-13 02:06:25 +03:00
|
|
|
if: github.event_name != 'pull_request'
|
2022-11-07 14:30:48 +03:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2020-03-20 23:03:48 +03:00
|
|
|
-
|
2022-11-08 14:41:28 +03:00
|
|
|
name: Run Buildx for amd64, armv7, arm64 architectures
|
2023-03-13 02:06:25 +03:00
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|