diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml new file mode 100644 index 0000000..548d786 --- /dev/null +++ b/.github/workflows/on-pr.yml @@ -0,0 +1,18 @@ +name: On Pull Request + +on: + pull_request: + branches: [ main ] + +env: + IMAGE_NAME: fedora-rust-builder + +jobs: + docker-build-test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Try Build + run: | + # Build Image + docker build -f Dockerfile -t $IMAGE_NAME . diff --git a/.github/workflows/docker-image.yml b/.github/workflows/on-release.yml similarity index 58% rename from .github/workflows/docker-image.yml rename to .github/workflows/on-release.yml index b515d15..655987f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/on-release.yml @@ -5,8 +5,7 @@ on: types: [published] env: - IMAGE_NAME: linux-stable - DOCKER_IMAGE_NAME: kresna360/fedora34-rust-base + IMAGE_NAME: fedora-rust-builder jobs: docker-publish-stable: @@ -21,9 +20,6 @@ jobs: # Login Github Docker Registry echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - # Login Docker Hub - echo "${{ secrets.DOCKER_KEY }}" | docker login -u kresna360 --password-stdin - # Github Package Registry Tag & Push IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') @@ -36,15 +32,3 @@ jobs: VERSION=latest docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION - - # Docker Hub Tag & Push - IMAGE_ID=$DOCKER_IMAGE_NAME - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$IMAGE_NAME-$(echo $VERSION | sed -e 's/^v//') - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - VERSION=$IMAGE_NAME-latest - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION diff --git a/README.md b/README.md index 3bb9e41..2960035 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,6 @@ This is a docker base image for multistage native binary build. - Python 3.9 Development Packages - GCC 11.1.1 -- Clang/LLVM 12.0.0 -- Rust 1.52.1 (Stable) +- Clang/LLVM 12.0.1 +- Rust 1.53.0 (Stable) - musl libc