-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.12 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish to DockerHub
on:
push:
branches:
- main
jobs:
docker-build:
runs-on: depot-ubuntu-22.04
name: Docker Build
permissions:
contents: read
id-token: write
actions: read
packages: write
environment: dockerhub
steps:
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
with:
oidc: true
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: insecureapps/broken-flask
tags: |
type=raw,value=latest,enable=true
- name: Build and Push Docker Images to DockerHub
uses: depot/build-push-action@v1
with:
project: 3tk5v5p8nq
context: ./
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}