-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 972 Bytes
/
docker-image.yml
File metadata and controls
39 lines (31 loc) · 972 Bytes
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
name: Docker Image CI
on:
workflow_dispatch
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
name: Push Docker image to Docker Hub
runs-on: [self-hosted]
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2.0.0
- name: Docker Login
uses: docker/login-action@v2.0.0
with:
# Username used to log against the Docker registry
username: ${{ secrets.DOCKER_USERNAME }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKER_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v3.0.0
with:
push: true
context: .
tags: ${{ env.IMAGE_NAME }}:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7