This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (69 loc) · 2.47 KB
/
docker-image.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
name: Build Docker Image
on:
push:
branches:
- main
- bucket-tester-app-image
env:
REGISTRY: ghcr.io
DOCKER_USERNAME: fczuardi
IMAGE_NAME: ${{ github.repository }}
jobs:
build-main:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push (main) Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
test-node:
runs-on: ubuntu-latest
container: node:10.16-jessie
steps:
- run: node --version
build-webapp:
runs-on: ubuntu-latest
container: ghcr.io/marmotitude/object-storage-tests:bucket-tester-app-image
steps:
- name: Pre-build webapp
run: gotpl
# cd \app
# cp example.config.yaml config.yaml
# just _pre-build-webapp
# install just
# - run: wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
# - run: echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
# - run: sudo apt update
# - run: sudo apt install just
# # install gotpl
# - run: wget https://github.com/belitre/gotpl/releases/download/v0.7/gotpl-v0.7-linux-amd64.zip && unzip gotpl-v0.7-linux-amd64.zip
# - run: sudo cp linux-amd64/gotpl /usr/bin
# write nginx.conf
- name: Build and push (webapp) Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
file: webapp.Dockerfile
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:webapp