Skip to content

Replace simulador => emulador #29

Replace simulador => emulador

Replace simulador => emulador #29

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker
env:
DOCKER_CLI_EXPERIMENTAL: enabled
uses: crazy-max/ghaction-setup-docker@v2
with:
version: v24.0.6
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- 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: Checkout repository
uses: actions/checkout@v3
- name: Get version from VERSION file
id: get_version
run: echo "::set-output name=version::$(cat VERSION)"
- name: Check if Docker image already exists
id: check_image
run: |
VERSION_EXISTS=$(docker pull ${{ secrets.DOCKERHUB_USERNAME }}/mpp-pynq-front:${{ steps.get_version.outputs.version }} && echo "true" || echo "false")
echo "::set-output name=exists::$VERSION_EXISTS"
- name: Build Docker image
run: |
if [ "${{ steps.check_image.outputs.exists }}" = "false" ]; then
bash build.sh
else
echo "Docker image with this version already exists. Skipping build and push."
fi
create-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get version from VERSION file
id: get_version
run: echo "::set-output name=version::$(cat VERSION)"
- name: Release Existence Action
uses: insightsengineering/release-existence-action@v1.0.0
id: check_release
with:
release-tag: ${{ steps.get_version.outputs.version }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: Release ${{ steps.get_version.outputs.version }}
draft: false
prerelease: false
if: ${{ steps.check_release.outputs.release-exists == 'false' }}