-
-
Notifications
You must be signed in to change notification settings - Fork 57
44 lines (36 loc) · 1.03 KB
/
docker.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
name: Docker CI
on:
push:
branches:
- master
# pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Authenticate to the Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: steelscheme
password: ${{ secrets.DOCKER_HUB_PWD }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
# disable push on merge requests
- name: Test Build
uses: docker/build-push-action@v6
if: ${{ github.event_name == 'pull_request' }}
with:
push: false
platforms: linux/amd64,linux/arm64
tags: steelscheme/steel:latest
- name: Build and push the docker image
uses: docker/build-push-action@v6
if: ${{ github.event_name != 'pull_request' }}
with:
push: true
platforms: linux/amd64,linux/arm64
tags: steelscheme/steel:latest