refactor: set InsecureSkipVerify
only once (#822)
#158
Workflow file for this run
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: docker hub release | |
# build master with multi-arch to docker hub | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
buildx-dockerhub: | |
if: github.repository == 'jeessy2/ddns-go' | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_REPO: ${{ secrets.DOCKER_USERNAME }}/ddns-go | |
DOCKER_PLATFORMS: linux/amd64,linux/arm,linux/arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.DOCKER_REPO }} | |
ghcr.io/${{ github.repository }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub # login to Docker Hub, automatically logout at the end of job | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run buildx and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true # push to docker hub | |
platforms: ${{ env.DOCKER_PLATFORMS }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |