Skip to content

Docker Build And Push #18

Docker Build And Push

Docker Build And Push #18

Workflow file for this run

name: Docker Build And Push
on:
schedule:
- cron: "0 0 * * *"
jobs:
check:
runs-on: 'ubuntu-latest'
steps:
- uses: octokit/request-action@v2.x
id: check_last_run
with:
route: GET /repos/${{github.repository}}/actions/workflows/main.yml/runs?per_page=1&status=completed
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
- run: "echo Last daily build: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}"
outputs:
last_sha: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
build:
needs: [check]
if: needs.check.outputs.last_sha != github.sha
secrets: inherit
runs-on: ubuntu-latest

Check failure on line 27 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Docker Build And Push

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 27, Col: 5): Unexpected value 'runs-on' .github/workflows/main.yml (Line: 28, Col: 5): Unexpected value 'steps'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build Debian package
uses: docker/build-push-action@v5
with:
load: true
push: false
target: builder
context: .
tags: lego-technic-deb:latest
- name: Extract to host
uses: shrink/actions-docker-extract@v3
id: extract
with:
image: lego-technic-deb:latest
path: /dist/.
destination: ./dist
- name: Push to Gemfury
run: |
debfile=$(find ./dist/*.deb)
curl -F package=@$debfile https://${{ secrets.GEMFURY_TOKEN }}@push.fury.io/debilin/
- name: Build Docker Image
id: buildAndPushImage
uses: MaximilianoBz/dockerhub-buildpush@v1.0
with:
registry_url: 'docker.io'
repository_name: 'lego-technic'
user_name: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
image_version: 'nightly'
docker_file: '.'
- name: Get pre step result output image_pull_url
run: echo "The time was ${{ steps.buildAndPushImage.outputs.image_pull_url }}"