Skip to content

Commit

Permalink
Feat/rust stable 1.53.0 (#1)
Browse files Browse the repository at this point in the history
* feat(rust-stable): rustc 1.53.0
* chore(rust-stable): add on-pr gh action
  • Loading branch information
Ujang360 authored Jun 27, 2021
1 parent 327503d commit 13678e2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -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 .
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]')
Expand All @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 13678e2

Please sign in to comment.