-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.08 KB
/
build-and-publish.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
name: Build and push Docker image
on:
push:
branches: ['master']
paths: [ '.github/workflows/build-and-publish.yml', 'web/**' ]
jobs:
build_and_push:
name: Build and push image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: hense1994
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Package and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:web"
push: true
provenance: false
labels: |
maintainer=${{ github.repository_owner }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=Commit message: ${{ github.event.head_commit.message }}
tags: |
hense1994/${{ github.event.repository.name }}:latest
hense1994/${{ github.event.repository.name }}:${{ github.sha }}