Skip to content
Snippets Groups Projects
Unverified Commit 6c47fb52 authored by Dulmandakh's avatar Dulmandakh Committed by GitHub
Browse files

bump GH actions (#207)

parent 15b40f28
No related branches found
No related tags found
No related merge requests found
name: Publish
on:
pull_request:
release:
types: [published]
......@@ -7,36 +8,33 @@ jobs:
publish_to_dockerhub:
name: Publish to Docker Hub
runs-on: ubuntu-22.04
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare tags
env:
DOCKER_IMAGE: reactnativecommunity/react-native-android
STABLE_MAJOR: 1
id: tags
run: |
VERSION=${GITHUB_REF#refs/tags/v}
MAJOR=$(echo $VERSION | cut -d'.' -f 1)
TAGS="$DOCKER_IMAGE:$VERSION,$DOCKER_IMAGE:$MAJOR"
if [[ $MAJOR == $STABLE_MAJOR ]]; then
TAGS="$TAGS,$DOCKER_IMAGE:latest"
fi
echo ::set-output name=tags::${TAGS}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
flavor: |
latest=false
images: |
reactnativecommunity/react-native-android
tags: |
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
- name: Build & publish to Docker Hub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.tags }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment