Skip to content

Commit acc56b5

Browse files
committed
test: implement build from scratch
1 parent ec3b885 commit acc56b5

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

.github/workflows/deploy.yaml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,50 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
cleanup:
11+
build-osm-tagger:
1212
runs-on: ubuntu-latest
13+
needs: cleanup
1314
steps:
1415
- name: Delete huge unnecessary tools folder
1516
run: rm -rf /opt/hostedtoolcache
1617

17-
build-osm-tagger:
18-
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@3.1.1
19-
needs: cleanup
20-
with:
21-
image_name: ghcr.io/${{ github.repository }}/osm-tagger
22-
dockerfile: dockerfiles/app.dockerfile
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata for Docker
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ghcr.io/${{ github.repository }}/osm-tagger
36+
tags: |
37+
type=sha,format=long
38+
type=ref,event=branch
39+
type=ref,event=tag
40+
41+
- name: Build and push
42+
uses: docker/build-push-action@v5
43+
with:
44+
context: .
45+
file: dockerfiles/app.dockerfile
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max
51+
52+
- name: Output image tag
53+
id: image_tag
54+
run: echo "image_tag=$(echo ${{ steps.meta.outputs.tags }} | cut -d',' -f1)" >> $GITHUB_OUTPUT
2355

2456
deploy-infra:
2557
needs: build-osm-tagger

0 commit comments

Comments
 (0)