-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (59 loc) · 2 KB
/
tor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: tor
on:
workflow_dispatch:
schedule:
- cron: "0 21 * * *"
push:
branches:
- master
paths:
- tor/**
- .github/workflows/tor.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Set date
id: date
run: |
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
- name: Login to GitHub Container Registry
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@master
env:
CONTEXT: ${{ github.workflow }}
with:
context: ./${{ env.CONTEXT}}
file: ./${{ env.CONTEXT }}/Dockerfile
platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64
push: ${{ github.event_name != 'pull_request' }}
tags: |
zydou/${{ github.workflow }}:latest
zydou/${{ github.workflow }}:${{ env.DATE }}
ghcr.io/zydou/${{ github.workflow }}:latest
ghcr.io/zydou/${{ github.workflow }}:${{ env.DATE }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@main
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
repository: ${{ github.repository_owner }}/${{ github.workflow }}
short-description: "Dockerized tor client based on alpine"
readme-filepath: ${{ github.workflow }}/README.md