Skip to content

Commit 41ec01d

Browse files
authored
Merge pull request #233 from 8cH9azbsFifZ/master
Docker Images
2 parents 7dc2235 + 7fe6541 commit 41ec01d

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/docker.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Create and publish a Docker image
7+
8+
on:
9+
push:
10+
branches:
11+
- 'master'
12+
- 'main'
13+
- 'dev'
14+
15+
tags:
16+
- 'v*'
17+
- 'v*.*'
18+
- 'v*.*.*'
19+
- '*'
20+
- '*.*'
21+
- '*.*.*'
22+
pull_request:
23+
branches:
24+
- 'main'
25+
- 'dev'
26+
27+
28+
env:
29+
REGISTRY: ghcr.io
30+
IMAGE_NAME: ${{ github.repository }}
31+
32+
jobs:
33+
build-and-push-image:
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
packages: write
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
- name: Set up QEMU
44+
uses: docker/setup-qemu-action@v2
45+
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v2
48+
49+
- name: Log in to the Container registry
50+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
51+
with:
52+
registry: ${{ env.REGISTRY }}
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Extract metadata (tags, labels) for Docker
57+
id: meta
58+
uses: docker/metadata-action@v4
59+
with:
60+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
61+
tags: |
62+
type=semver,pattern={{version}}
63+
type=semver,pattern={{major}}.{{minor}}
64+
type=semver,pattern={{major}}
65+
type=sha
66+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
67+
68+
- name: Build and push Docker image
69+
uses: docker/build-push-action@v4
70+
with:
71+
context: .
72+
push: true
73+
platforms: linux/amd64,linux/arm64
74+
tags: ${{ steps.meta.outputs.tags }}
75+
labels: ${{ steps.meta.outputs.labels }}

python-github-backup.code-workspace

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
]
7+
}

0 commit comments

Comments
 (0)