@@ -13,19 +13,19 @@ on:
|
|||||||
description: True if the image should be pushed after building
|
description: True if the image should be pushed after building
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: string # really boolean
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: cjyar-24
|
runs-on: cjyar-24
|
||||||
steps:
|
steps:
|
||||||
- name: docker login
|
- name: docker login
|
||||||
if: ${{ inputs.push == true }}
|
if: ${{ inputs.push == 'true' }}
|
||||||
run: docker login -u cjyar -p "${{ secrets.DOCKER_TOKEN }}"
|
run: docker login -u cjyar -p "${{ secrets.DOCKER_TOKEN }}"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: build
|
- name: build
|
||||||
run: docker build -t ${{ inputs.image_name }}:${{ github.run_number }} .
|
run: docker build -t ${{ inputs.image_name }}:${{ github.run_number }} .
|
||||||
- name: push
|
- name: push
|
||||||
if: ${{ inputs.push == true }}
|
if: ${{ inputs.push == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
docker create --name run_${{ github.run_number }} ${{ inputs.image_name }}:${{ github.run_number }}
|
docker create --name run_${{ github.run_number }} ${{ inputs.image_name }}:${{ github.run_number }}
|
||||||
docker export -o /tmp/image run_${{ github.run_number }}
|
docker export -o /tmp/image run_${{ github.run_number }}
|
||||||
|
|||||||
Reference in New Issue
Block a user