Skip to content

Commit

Permalink
update the github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
skibum1869 committed Nov 20, 2024
1 parent 382578e commit 91728ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
# Publish `main` as Docker `latest` image.
# branches:
# - "main"
# - "main"

# Publish `2.1.2.3` tags as releases.
tags:
Expand All @@ -22,28 +22,22 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: create version
- name: create version
run: |
echo "VERSION=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
echo "MAJOR_VERSION=$(echo ${{ github.ref_name }} | sed -E 's/^([0-9]+)\.([0-9]+)\..+/\1.\2/')" >> $GITHUB_ENV
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -56,7 +50,6 @@ jobs:
# push to docker hub
push: true


# steps:
# - name: Build and push Docker images
# uses: docker/build-push-action@v2.5.0
23 changes: 8 additions & 15 deletions .github/workflows/dockertest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,28 @@ on:
# workflow_dispatch:

env:
app: ods
app: mtconnect

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: create version
- name: create version
run: |
echo "VERSION=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
echo "MAJOR_VERSION=$(echo ${{ github.ref_name }} | sed -E 's/^([0-9]+)\.([0-9]+)\..+/\1.\2/')" >> $GITHUB_ENV
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -55,7 +49,6 @@ jobs:
# push to docker hub
push: true


# steps:
# - name: Build and push Docker images
# uses: docker/build-push-action@v2.5.0

0 comments on commit 91728ea

Please sign in to comment.