-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
79 lines (63 loc) · 2.56 KB
/
deploy-docker.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Docker Deployment
on:
# release:
# types: [published]
push:
tags:
- docker*
workflow_dispatch:
permissions:
contents: read
env:
LATEST_IMAGE_NODE_MAJOR_VERSION: 20
jobs:
run-docker-build-and-test:
uses: ./.github/workflows/test.yaml
with:
rebuild-docker-images-call: true
deploy:
name: Build and Push Docker
needs: run-docker-build-and-test
runs-on: ubuntu-latest
steps:
- name: Download images artifact - node14
uses: actions/download-artifact@v4
with:
name: electron-builder-all-14
path: ${{ runner.temp }}
- name: Download images artifact - node16
uses: actions/download-artifact@v4
with:
name: electron-builder-all-16
path: ${{ runner.temp }}
- name: Download images artifact - node18
uses: actions/download-artifact@v4
with:
name: electron-builder-all-18
path: ${{ runner.temp }}
- name: Download images artifact - node20
uses: actions/download-artifact@v4
with:
name: electron-builder-all-20
path: ${{ runner.temp }}
- name: Load all images
run: find ${{ runner.temp }} -type f -name "electron-builder-all-*.tar" -exec docker image load --input "{}" \;
- name: Tag LTS images for electron-builder latest/wine/wine-chrome/wine-mono
run: |
docker image tag electronuserland/builder:${{ env.LATEST_IMAGE_NODE_MAJOR_VERSION }} electronuserland/builder:latest
docker image tag electronuserland/builder:${{ env.LATEST_IMAGE_NODE_MAJOR_VERSION }}-wine electronuserland/builder:wine
docker image tag electronuserland/builder:${{ env.LATEST_IMAGE_NODE_MAJOR_VERSION }}-wine-mono electronuserland/builder:wine-mono
docker image tag electronuserland/builder:${{ env.LATEST_IMAGE_NODE_MAJOR_VERSION }}-wine-chrome electronuserland/builder:wine-chrome
- name: List all images and tags
run: docker image ls -a
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push all Docker images (workflow_dispatch test)
if: github.event_name == 'workflow_dispatch'
run: echo "TESTING step logic. (this would normally trigger docker push)"
- name: Push all Docker images
if: github.event_name != 'workflow_dispatch'
run: docker image push --all-tags electronuserland/builder