Skip to content

CD

CD #3

Workflow file for this run

name: CD
on:
workflow_dispatch:
#pull_request:
# branches:
# - "main"
#tags:
# - "v*.*.*"
env:
TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPO }}:22.04-v0.31.1
LATEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPO }}:latest
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and export to Docker
uses: docker/[email protected]
with:
context: .
file: Dockerfile.ubuntu
platforms: linux/amd64
push: false
load: true
tags: ${{ env.TEST_TAG }}
- name: Generate Release
run: |
docker run \
--interactive \
--rm \
--volume ./project-demo/demo2:/project \
${{ env.TEST_TAG }} \
ceedling release
- name: GitHub Release
uses: softprops/[email protected]
#if: startsWith(github.ref, 'refs/tags/')
with:
files: build/artifacts/release/MyApp.out
# - name: Build and push
# uses: docker/[email protected]
# with:
# context: .
# file: Dockerfile.ubuntu
# platforms: linux/amd64
# push: false
# tags: ${{ env.LATEST_TAG }}