Skip to content

global-ci assumes image lives in /tmp #37

global-ci assumes image lives in /tmp

global-ci assumes image lives in /tmp #37

name: container-latest
# Build a "latest" container for every commit
on:
push:
branches:
- main
- ci-global
concurrency: container-latest
env:
IMAGE_NAME: trustd
IMAGE_TAG: latest
jobs:
build-binaries:
uses: ./.github/workflows/build-binary.yaml
with:
version: latest
build-container:
needs: build-binaries
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/download
- name: Display downloaded content
run: ls -R ${{ github.workspace }}/download
# Build the container
- name: Build container
uses: ./.github/actions/build-container
with:
image_name: ${{ env.IMAGE_NAME }}
image_tag: ${{ env.IMAGE_TAG }}
test:
needs: build-container
uses: trustification/trustify-ci/.github/workflows/global-ci.yml@main
with:
artifact: container
run_api_tests: true
run_ui_tests: true
publish:
needs: test
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
attestations: write
steps:
# Push to ghcr.io
- name: Push to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}