Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
101 lines (98 loc) · 3.34 KB

File metadata and controls

101 lines (98 loc) · 3.34 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Docker
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: "Release tag to (re)publish, for example v0.1.79"
required: true
jobs:
build:
runs-on: [self-hosted, Linux, X64, iptvtunerr]
permissions:
contents: read
packages: write
env:
HAS_DOCKERHUB: ${{ secrets.DOCKERHUB_TOKEN != '' && 'true' || 'false' }}
RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
fetch-depth: 0
- name: Require release tag on main
env:
RELEASE_TAG_MAIN_MODE: ancestor
run: ./scripts/ensure-release-tag-on-main.sh "${RELEASE_TAG}"
- uses: docker/setup-qemu-action@v4
- name: Write BuildKit network config
id: buildkit-config
run: |
set -euo pipefail
config="${RUNNER_TEMP:-/tmp}/iptvtunerr-buildkitd.toml"
mapfile -t nameservers < <(awk '$1 == "nameserver" { print $2 }' /etc/resolv.conf)
if [[ "${#nameservers[@]}" -eq 0 ]]; then
nameservers=(1.1.1.1 9.9.9.9)
fi
quoted=""
for ns in "${nameservers[@]}"; do
if [[ -n "$quoted" ]]; then
quoted+=", "
fi
quoted+="\"$ns\""
done
cat > "$config" <<EOF
[dns]
nameservers = [$quoted]
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
EOF
echo "path=$config" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v4
with:
buildkitd-config: ${{ steps.buildkit-config.outputs.path }}
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN || secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
id: dockerhub
if: env.HAS_DOCKERHUB == 'true'
continue-on-error: true
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME || 'snapetech' }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker metadata (tags/labels)
id: meta
uses: docker/metadata-action@v6
with:
images: |
ghcr.io/${{ github.repository }}
${{ steps.dockerhub.outcome == 'success' && 'snapetech/iptvtunerr' || '' }}
tags: |
type=raw,value=latest
type=raw,value=${{ env.RELEASE_TAG }}
- name: Build and push Docker image
id: docker-build
continue-on-error: true
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: VERSION=${{ env.RELEASE_TAG }}
- name: Retry Docker build and push
if: steps.docker-build.outcome == 'failure'
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: VERSION=${{ env.RELEASE_TAG }}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.