Skip to content

Commit 45ec1ea

Browse files
committed
Add experimental GitHub Action
1 parent 349d079 commit 45ec1ea

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/debian.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Image Builder
2+
3+
on:
4+
push:
5+
paths:
6+
- 'debian/*'
7+
- 'versions.md'
8+
- 'LICENSE'
9+
- '**/bookworm/*'
10+
pull_request:
11+
# Build, but don't push on pull requests
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
needs: configure
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
stack: ${{ fromJSON( needs.configure.outputs.stacks ) }}
23+
version: ${{ fromJSON( needs.configure.outputs.pandoc-version ) }}
24+
25+
env:
26+
PUSH_IMAGE: ${{ github.repository == 'pandoc/dockerfiles' &&
27+
(github.ref == 'refs/heads/main' ||
28+
github.ref_type == 'tag' ||
29+
github.event_name != 'pull_request') }}
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Login to Docker Hub
36+
uses: docker/login-action@v3
37+
if: ${{ env.PUSH_IMAGE }}
38+
with:
39+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
40+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
41+
42+
- name: Build and maybe push image
43+
uses: docker/build-push-action@v5
44+
with:
45+
file: '3.5/bookworm/Dockerfile'
46+
context: '.'
47+
push: ${{ env.PUSH_IMAGE }}
48+
tags: '3.5-debian'

0 commit comments

Comments
 (0)