This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
Merge pull request #750 from wasmCloud/dependabot/npm_and_yarn/packag… #312
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: Build and Release Docker Artifact | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v[0-9].[0-9]+.[0-9]+ | |
jobs: | |
push_to_registry: | |
name: Push Docker image to Azure and Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- uses: azure/docker-login@v1 | |
if: github.repository == 'wasmCloud/wash' | |
with: | |
login-server: ${{ secrets.AZURECR_PUSH_URL }} | |
username: ${{ secrets.AZURECR_PUSH_USER }} | |
password: ${{ secrets.AZURECR_PUSH_PASSWORD }} | |
- uses: docker/login-action@v2 | |
if: github.repository == 'wasmCloud/wash' | |
with: | |
username: ${{ secrets.DOCKERHUB_PUSH_USER }} | |
password: ${{ secrets.DOCKERHUB_PUSH_PASSWORD }} | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
wasmcloud/wash | |
wasmcloud.azurecr.io/wash | |
tags: | | |
type=semver,pattern={{version}} | |
type=sha | |
flavor: | | |
latest=auto | |
labels: | | |
org.opencontainers.image.title=wash | |
org.opencontainers.image.description=WAsmcloud SHell | |
org.opencontainers.image.vendor=wasmCloud | |
org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
- name: Build and push | |
id: docker_build_builder | |
uses: docker/build-push-action@v4 | |
with: | |
file: "Dockerfile" | |
push: ${{ github.repository == 'wasmCloud/wash' }} | |
target: release-alpine | |
tags: | | |
wasmcloud/wash:alpine | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Build and push - scratch | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
file: "Dockerfile" | |
push: ${{ github.repository == 'wasmcloud/wash' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |