Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Commit ad13b02

Browse files
committed
ci: try this
1 parent 9ea6bcc commit ad13b02

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

.github/workflows/build-and-push.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,52 @@ on:
44
push:
55
branches:
66
- main
7-
- ci
87
release:
98
types: [published]
109

1110
jobs:
12-
deploy-pages:
13-
#needs: build-and-push
14-
runs-on: mathiasvda/yasgui:latest # there should be a better way to do this
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
1514
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Login to DockerHub
22+
uses: docker/login-action@v2
23+
with:
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+
- name: Extract metadata (tags, labels) for Docker
28+
id: meta
29+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
30+
with:
31+
images: ${{ vars.DOCKERHUB_REPO }}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
35+
with:
36+
context: .
37+
file: ./Dockerfile
38+
push: true
39+
build-args: GITHUB_REF=${{ github.ref_name }}
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}
42+
platforms: linux/amd64,linux/arm64
43+
44+
- uses: shrink/actions-docker-extract@v3
45+
id: extract
46+
with:
47+
image: ${{ vars.DOCKERHUB_REPO }}
48+
path: /usr/share/nginx/html/.
49+
destination: dist
50+
1651
- name: Upload static files as artifact
1752
id: deployment
1853
uses: actions/upload-pages-artifact@v3
1954
with:
20-
path: /usr/share/nginx/html/
55+
path: dist

0 commit comments

Comments
 (0)