From a39b84924756aa81b498289c5b2868350eb207d4 Mon Sep 17 00:00:00 2001 From: Ilir Bekteshi Date: Tue, 17 Dec 2019 12:47:12 +0100 Subject: [PATCH] Use published image for faster runs --- .github/workflows/dockerimage.yaml | 22 ++++++++++++++++++++++ action.yml | 8 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dockerimage.yaml diff --git a/.github/workflows/dockerimage.yaml b/.github/workflows/dockerimage.yaml new file mode 100644 index 0000000..c608ac9 --- /dev/null +++ b/.github/workflows/dockerimage.yaml @@ -0,0 +1,22 @@ +name: Docker Image CI +on: + push: + branches: + - master + paths: + - 'Dockerfile' + - 'entrypoint.sh' +jobs: + build: + runs-on: ubuntu-latest + env: + DOCKER_IMAGE: ilirbekteshi/action-yamllint + DOCKER_FILE: Dockerfile + steps: + - uses: actions/checkout@v1 + - name: Build the Docker image + run: | + docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }} + docker build . --file $DOCKER_FILE -t $DOCKER_IMAGE:$GITHUB_SHA -t $DOCKER_IMAGE:latest + docker push $DOCKER_IMAGE:$GITHUB_SHA + docker push $DOCKER_IMAGE:latest diff --git a/action.yml b/action.yml index 8d14fa4..3f9bb5a 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,13 @@ inputs: runs: using: 'docker' - image: 'Dockerfile' + image: 'docker://ilirbekteshi/action-yamllint' + args: + - ${{ inputs.file_or_dir }} + - ${{ inputs.config_file }} + - ${{ inputs.config_data }} + - ${{ inputs.format }} + - ${{ inputs.strict }} branding: color: blue