Merge pull request #5 from Sid220/beta #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PASS }} | |
- name: Bump version | |
shell: bash | |
env: | |
GH_PASS: ${{ secrets.GH_PASS }} | |
run: | | |
git config --global user.email "github+actions@gmail.com" | |
git config --global user.name "sid220" | |
git fetch --tags | |
wget https://raw.githubusercontent.com/Sid220/docker-apriltag-localisation/beta/gitbump.sh | |
chmod +x gitbump.sh | |
bash gitbump.sh $GH_PASS | |
- name: Login to docker | |
shell: bash | |
env: | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
run: docker login --password "$DOCKER_PASS" --username "sid220" | |
- name: Create and enter builder | |
run: docker buildx create --name apriltag-builder && docker buildx use apriltag-builder | |
- name: Build the Docker image | |
run: docker buildx build --platform linux/amd64,linux/arm64 -t sid220/apriltag_localisation:latest -t sid220/apriltag_localisation:$(git tag --sort=-v:refname --list "v[0-9]*" | head -n 1 | cut -c 2-) --push . |