corrected repo #2
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: "Latest tag from master branch" | |
env: | |
DOCKERHUB_REPOSITORY: jdninfra/socks5-proxy | |
on: | |
pull_request: | |
branches: master | |
push: | |
branches: master | |
release: | |
types: [published, edited] | |
jobs: | |
hadolint: | |
name: hadolint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: hadolint | |
uses: hadolint/[email protected] | |
with: | |
ignore: DL3018 | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v1 | |
- | |
name: Set up Docker Buildx | |
id: buildx | |
uses: crazy-max/[email protected] | |
- | |
name: Print builder available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: $DOCKERHUB_REPOSITORY | |
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}} | |
- | |
name: Dockerhub login | |
uses: docker/login-action@v2 | |
if: github.event_name != 'pull_request' | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Run Buildx for amd64, armv7, arm64 architectures | |
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 }} |