Test docker build custom file #200
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Test docker build custom file | |
| on: | |
| # # Uncomment when test added first time to register workflow and comment it back after workflow would be registered | |
| # # | |
| # # Added pull_request to register workflow from the PR. | |
| # # Read more https://stackoverflow.com/questions/63362126/github-actions-how-to-run-a-workflow-created-on-a-non-master-branch-from-the-wo | |
| # pull_request: {} | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "The fully-formed ref of the branch or tag that triggered the workflow run" | |
| required: false | |
| type: "string" | |
| sha: | |
| description: "The sha of the commit that triggered the workflow run" | |
| required: false | |
| type: "string" | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup | |
| run: echo "Do setup" | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: [setup] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - uses: ./ | |
| id: current | |
| with: | |
| workdir: ./test/custom | |
| file: Dockerfile_complex | |
| organization: ${{ github.event.repository.owner.login }} | |
| repository: ${{ github.event.repository.name }} | |
| registry: registry.hub.docker.com | |
| login: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| build-args: | | |
| TEST_ARG=test_value | |
| SECOND_ARG=two | |
| tags: | | |
| type=sha,format=long,suffix=-complex,priority=1002 | |
| - uses: nick-fields/assert-action@v2 | |
| with: | |
| expected: 'registry.hub.docker.com/cloudposse/github-action-docker-build-push' | |
| actual: ${{ steps.current.outputs.image }} | |
| - uses: nick-fields/assert-action@v2 | |
| with: | |
| expected: sha-${{ github.sha }}-complex | |
| actual: ${{ steps.current.outputs.tag }} | |
| teardown: | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: ${{ always() }} | |
| steps: | |
| - name: Tear down | |
| run: echo "Do Tear down" |