github.com/redhat-appstudio/e2e-tests@v0.0.0-20230619105049-9a422b2094d7/.github/workflows/build.yaml (about)

     1  name: Container build & push
     2  
     3  # Controls when the workflow will run
     4  on:
     5    push:
     6      branches: [main]
     7  
     8  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
     9  jobs:
    10    # This workflow contains a single job called "build"
    11    build-image:
    12      runs-on: ubuntu-20.04
    13      steps:
    14        - name: Checkout source code
    15          uses: actions/checkout@v2
    16        - name: Build Image
    17          id: build-image
    18          uses: redhat-actions/buildah-build@v2
    19          with:
    20            image: e2e-tests
    21            tags: main ${{ github.sha }}
    22            dockerfiles: |
    23              ./Dockerfile
    24        - name: Push To quay.io
    25          id: push-to-quay
    26          uses: redhat-actions/push-to-registry@v2
    27          with:
    28            image: ${{ steps.build-image.outputs.image }}
    29            tags: ${{ steps.build-image.outputs.tags }}
    30            registry: quay.io/redhat-appstudio
    31            username: ${{ secrets.QUAY_USERNAME }}
    32            password: ${{ secrets.QUAY_TOKEN }}
    33        - name: Print image url
    34          run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"