feat(src/search-app): init #386
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: Docker Image CI/CD - Beta - knifehub-amd-chrome-beta | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
# build and push | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get latest release | |
id: last_release | |
uses: InsonusK/[email protected] | |
with: | |
myToken: ${{ github.token }} | |
exclude_types: "release, prerelease" | |
view_top: 1 | |
- name: Set outputs | |
id: vars | |
run: | | |
echo ::set-output name=IMAGE_NAME::knifehub | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Registry - Docker Hub | |
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build Image and Push - Docker Hub | |
# push: last_release-beta | |
run: | | |
docker buildx build \ | |
--platform=linux/amd64 \ | |
--output "type=image,push=true" \ | |
--file src/KnifeHub.Web/Dockerfile.amd-chrome \ | |
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:${{ steps.last_release.outputs.tag_name }}-amd-chrome-beta \ | |
. | |
- name: Login to Registry - ghcr.io | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build Image and Push - ghcr.io | |
# push: last_release-beta | |
run: | | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.IMAGE_NAME }} | |
VERSION=${{ steps.last_release.outputs.tag_name }}-amd-chrome-beta | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker buildx build \ | |
--platform=linux/amd64 \ | |
--output "type=image,push=true" \ | |
--file src/KnifeHub.Web/Dockerfile.amd-chrome \ | |
--tag $IMAGE_ID:$VERSION \ | |
. |