Skip to content

Commit

Permalink
Update docker build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed Aug 17, 2023
1 parent 1a73f9d commit e7f0ba9
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 712 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build-docker-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker Base Image
on:
push:
branches: [ master ]
paths: 'base.dockerfile'
paths: [ 'base.dockerfile' ]

jobs:
build:
Expand All @@ -12,19 +12,18 @@ jobs:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GH_PAT }}
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./
file: ./base.dockerfile
Expand All @@ -33,6 +32,6 @@ jobs:
JOBS=2
VERSION=${{ steps.date.outputs.date }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/geoflow-bundle-base:latest, ${{ secrets.DOCKER_HUB_USERNAME }}/geoflow-bundle-base:${{ steps.date.outputs.date }}
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/geoflow-bundle-base:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/geoflow-bundle-base:buildcache,mode=max
tags: 3dgi/geoflow-bundle-base:${{ steps.date.outputs.date }}
cache-from: type=registry,ref=3dgi/geoflow-bundle-base:buildcache
cache-to: type=registry,ref=3dgi/geoflow-bundle-base:buildcache,mode=max
36 changes: 36 additions & 0 deletions .github/workflows/build-docker-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Builder Image

on:
push:
tags:
- '202[2-9].[0-9]+.[0-9]+'
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./
file: ./builder.dockerfile
builder: ${{ steps.buildx.outputs.name }}
build-args: |
JOBS=2
VERSION=${{ github.ref_name }}
push: true
tags: 3dgi/geoflow-bundle-builder:${{ github.ref_name }}
cache-from: type=registry,ref=3dgi/geoflow-bundle-builder:buildcache
cache-to: type=registry,ref=3dgi/geoflow-bundle-builder:buildcache,mode=max
106 changes: 0 additions & 106 deletions base-ubuntu.dockerfile

This file was deleted.

Loading

0 comments on commit e7f0ba9

Please sign in to comment.