21
.github/actions/build-image/action.yml
vendored
Normal file
21
.github/actions/build-image/action.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: 'Build And Publish Image'
|
||||
description: 'Builds and publishes image'
|
||||
inputs:
|
||||
version:
|
||||
description: 'image tag'
|
||||
required: true
|
||||
dockerhub-username:
|
||||
description: 'dockerhub username'
|
||||
required: true
|
||||
dockerhub-password:
|
||||
description: 'dockerhub password'
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build and Push image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: springcloud/baseimage:${{ inputs.version }}
|
||||
24
.github/workflows/ci.yml
vendored
Normal file
24
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository_owner == 'spring-cloud'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Determine version
|
||||
run: |
|
||||
echo baseimage_version=$(cat version.txt) >> $GITHUB_ENV
|
||||
- name: Build and Publish Images
|
||||
uses: ./.github/actions/build-images
|
||||
with:
|
||||
version: ${{ env.baseimage_version }}
|
||||
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user