1
mirror of https://github.com/jakejarvis/docker-tor.git synced 2025-11-27 00:16:07 -05:00

initial commit 🎉

This commit is contained in:
2022-12-29 11:35:34 -05:00
commit aa5b5c006a
3 changed files with 107 additions and 0 deletions

57
.github/workflows/build-and-push.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Build and push image
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- 'main'
permissions:
contents: read
# packages: write
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - uses: docker/login-action@v2
# if: github.event_name != 'pull_request'
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v4
id: meta
with:
images: |
jakejarvis/tor
# ghcr.io/jakejarvis/tor
flavor: |
latest=auto
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=pep440,pattern={{raw}}
type=pep440,pattern=v{{major}}.{{minor}}
type=ref,event=pr
- uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max