Skip to content

Commit

Permalink
composite actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Feb 8, 2024
1 parent 6d83417 commit 08bf4b5
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 43 deletions.
3 changes: 2 additions & 1 deletion actions/action-cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ inputs:
version:
description: "Version number"

jobs:
runs:
using: composite
build-and-upload:
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.platform.os }}
Expand Down
85 changes: 43 additions & 42 deletions actions/action-dockerimages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,50 @@ inputs:
version:
description: "Version number"

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
runs:
composite:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Update server package.json version
uses: jossef/[email protected]
with:
file: server/package.json
field: version
value: ${{ inputs.version }}
- name: Update server package.json version
uses: jossef/[email protected]
with:
file: server/package.json
field: version
value: ${{ inputs.version }}

- name: Update ui package.json version
uses: jossef/[email protected]
with:
file: ui/package.json
field: version
value: ${{ inputs.version }}
- name: Update ui package.json version
uses: jossef/[email protected]
with:
file: ui/package.json
field: version
value: ${{ inputs.version }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: MAIF/wasmo
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
# platforms: linux/amd64
file: ./Dockerfile
push: true
tags: maif/wasmo:${{ inputs.version }},maif/wasmo:latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: MAIF/wasmo

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
# platforms: linux/amd64
file: ./Dockerfile
push: true
tags: maif/wasmo:${{ inputs.version }},maif/wasmo:latest

0 comments on commit 08bf4b5

Please sign in to comment.