mirror of
https://github.com/maxkratz/docker_offlineimap.git
synced 2024-09-07 23:33:16 +00:00
Merge pull request #10 from maxkratz/feature/date-tags-dockerhub
Introduces CI builds for date tags on Dockerhub
This commit is contained in:
commit
d2db424652
3 changed files with 69 additions and 8 deletions
|
@ -1,14 +1,15 @@
|
|||
name: Build Docker images
|
||||
name: Build Docker image dev
|
||||
on:
|
||||
push:
|
||||
# Run pipeline for commits on branch main
|
||||
branches:
|
||||
- 'main'
|
||||
- 'testing/**'
|
||||
- 'feature/**'
|
||||
- 'hotfix/**'
|
||||
- '!testing/**'
|
||||
- '!feature/**'
|
||||
- '!hotfix/**'
|
||||
|
||||
jobs:
|
||||
build-latest:
|
||||
build-dev:
|
||||
runs-on: [ubuntu-22.04]
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -22,10 +23,10 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build latest
|
||||
- name: Build and push dev
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.event_name != 'schedule' }}
|
||||
tags: maxkratz/offlineimap:latest
|
||||
push: true
|
||||
tags: maxkratz/offlineimap:dev
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
27
.github/workflows/build-only.yml
vendored
Normal file
27
.github/workflows/build-only.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Build Docker images only
|
||||
on:
|
||||
push:
|
||||
# Run pipeline for commits on branches that are not main
|
||||
branches:
|
||||
- '!main'
|
||||
- 'testing/**'
|
||||
- 'feature/**'
|
||||
- 'hotfix/**'
|
||||
|
||||
jobs:
|
||||
build-only:
|
||||
runs-on: [ubuntu-22.04]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build latest
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: maxkratz/offlineimap:latest
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
33
.github/workflows/build-tag.yml
vendored
Normal file
33
.github/workflows/build-tag.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Build Docker images tag
|
||||
on:
|
||||
push:
|
||||
# Run pipeline for release tags
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build-tag:
|
||||
runs-on: [ubuntu-22.04]
|
||||
# Only run on pushed tags (and explicitely ignore scheduled runs)
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build tag and latest
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
maxkratz/offlineimap:latest
|
||||
maxkratz/offlineimap:${{github.ref_name}}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
Loading…
Reference in a new issue