Test docker build #216
Workflow file for this run
This file contains 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 | |
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: {} | |
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@v4 | |
- uses: ./ | |
id: current | |
with: | |
workdir: ./test | |
organization: ${{ github.event.repository.owner.login }} | |
repository: ${{ github.event.repository.name }} | |
registry: registry.hub.docker.com | |
login: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
tags: | | |
type=sha,format=long,suffix=-single-platform,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 }}-single-platform | |
actual: ${{ steps.current.outputs.tag }} | |
teardown: | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: ${{ always() }} | |
steps: | |
- name: Tear down | |
run: echo "Do Tear down" |