-
Notifications
You must be signed in to change notification settings - Fork 240
58 lines (49 loc) · 1.71 KB
/
Copy pathdocker-image.yml
File metadata and controls
58 lines (49 loc) · 1.71 KB
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
name: Docker Image CI
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_PUBHUB_USER }}
password: ${{ secrets.DOCKER_PUBHUB_PASS }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker Image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: false
tags: openlistteam/openlist_api_server:latest
- name: Build and push Docker Image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile-Lite
push: false
tags: openlistteam/openlist_api_server:alpine
- name: Push Docker Image to ghcrio
run: docker push openlistteam/openlist_api_server:latest
&& docker tag openlistteam/openlist_api_server:latest ghcr.io/openlistteam/openlist_api_server:latest
&& docker push ghcr.io/openlistteam/openlist_api_server:latest
- name: Push Docker Image to ghcrio
run: docker push openlistteam/openlist_api_server:alpine
&& docker tag openlistteam/openlist_api_server:alpine ghcr.io/openlistteam/openlist_api_server:alpine
&& docker push ghcr.io/openlistteam/openlist_api_server:alpine