50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: "Release tag"
|
|
env:
|
|
DOCKERHUB_REPOSITORY: serjs/go-socks5-proxy
|
|
|
|
on:
|
|
release:
|
|
# Only use the types keyword to narrow down the activity types that will trigger your workflow.
|
|
types: [published, edited]
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v1.1.0
|
|
-
|
|
name: Release version
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
|
-
|
|
name: Print release version
|
|
run: echo ${{ env.RELEASE_VERSION }}
|
|
-
|
|
name: Dockerhub login
|
|
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
-
|
|
name: Run Buildx for amd64, armv7, arm64 architectures
|
|
run: |
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
|
|
--output "type=image,push=false" \
|
|
--push \
|
|
--tag "$DOCKERHUB_REPOSITORY:$RELEASE_VERSION" \
|
|
.
|
|
# Legacy build for armv6
|
|
-
|
|
name: Run Buildx for armv6 architecture
|
|
run: |
|
|
docker buildx build \
|
|
--platform linux/arm/v6 \
|
|
--output "type=image,push=false" \
|
|
--push \
|
|
--tag "$DOCKERHUB_REPOSITORY:$RELEASE_VERSION" \
|
|
--file Dockerfile.armv6
|
|
.
|