Skip to content

ci: test ci

ci: test ci #107

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI to Docker Hub
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_call:
inputs:
image_name:
required: true
type: string
tag:
type: string
secrets:
DOCKER_HUB_USERNAME:
required: true
DOCKER_HUB_ACCESS_TOKEN:
required: true
DOCKER_HUB_DISTRO:
required: false
GH_PAGES_DEPLOY:
required: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-and-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install dependencies
run: sudo apt-get install python3-github
- name: Check Out Repo
uses: actions/checkout@main
- name: Login to Docker Hub
uses: docker/login-action@master
env:
DOCKER_USER: ${{ secrets.DOCKER_HUB_USERNAME }}
if: ${{ env.DOCKER_USER != '' }}
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: install docker-build
run: |
curl -Ls -o install-dockerbuild https://github.com/cafe-desktop/cafe-dev-scripts/raw/master/travis/build/install-dockerbuild.sh
curl -Ls -o build-push https://github.com/cafe-desktop/cafe-dev-scripts/raw/master/travis/build/build-push.sh
chmod +x install-dockerbuild build-push
./install-dockerbuild
echo "VERSION_DPL=`wget https://github.com/JamesIves/github-pages-deploy-action/releases/latest && cat latest |grep 'JamesIves/github-pages-deploy-action · GitHub'|cut -d " " -f4`" >> $GITHUB_ENV
- name: Build and push
env:
TRAVIS_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
./build-push ${{ secrets.DOCKER_HUB_DISTRO }}
- name: Deploy
env:
GH_DEPLOY: ${{ secrets.GH_PAGES_DEPLOY }}
uses: JamesIves/github-pages-deploy-action@${{ env.VERSION_DPL }}

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

View workflow run for this annotation

GitHub Actions / CI to Docker Hub

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 79, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VERSION_DPL
if: ${{ github.event_name == 'push' && env.GH_DEPLOY != 'false' }}
with:
branch: gh-pages
folder: html-report
single-commit: true
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}