Skip to content

Merge pull request #20 from Ndeta100/ndeta-0 #10

Merge pull request #20 from Ndeta100/ndeta-0

Merge pull request #20 from Ndeta100/ndeta-0 #10

Workflow file for this run

on: push
jobs:
build-container:
name: Build container
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push to docker hub
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ndeta100/hotel-api:${{ github.run_number }}
- name: Clean up
run: docker rmi ndeta100/hotel-api:${{ github.run_number -1}}

Check failure on line 21 in .github/workflows/dockerhub.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/dockerhub.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/dockerhub.yaml (Line: 21, Col: 14): Unexpected symbol: '-1'. Located at position 19 within expression: github.run_number -1