-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1007 Bytes
/
ci.yaml
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
name: ci
on:
push:
branches:
- master
pull_request:
jobs:
web:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
context: .
file: ./Dockerfile
push: true
tags: |
sthlmio/web:1.0.${{ github.run_number }}
sthlmio/web:${{ github.sha }}
sthlmio/web:latest
- name: Call watchtower endpoint
run: |
curl -H "Authorization: Bearer ${{ secrets.WATCHTOWER_HTTP_API_TOKEN }}" "https://watchtower.sthlm.io/v1/update"