Bump version of cenclave-lib-sgx to 1.0.0 #2
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: Cosmian Enclave base container image | |
on: | |
# Only run when pull request is closed and merged into main/develop | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
# Do not run on push | |
push: | |
branches-ignore: | |
- "**" | |
tags-ignore: | |
- "**" | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
contents: read | |
env: | |
IMAGE: ghcr.io/cosmian/cenclave-base | |
steps: | |
- name: Build date | |
id: build_date | |
run: | | |
echo "BUILD_DATE=$(date -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.IMAGE }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: ${{ contains(github.ref, 'main') }} | |
tags: | | |
${{ env.IMAGE }}:${{ github.sha }} | |
${{ env.IMAGE }}:${{ steps.build_date.outputs.BUILD_DATE }} | |
labels: ${{ steps.meta.outputs.labels }} |