Skip to content

Update actions/checkout action to v4 (#548) #348

Update actions/checkout action to v4 (#548)

Update actions/checkout action to v4 (#548) #348

Workflow file for this run

name: Docker Build
on:
push:
tags:
branches:
- main
- dev
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Wait for checks to succeed
uses: lewagon/wait-on-check-action@master
with:
ref: ${{ github.ref }}
check-name: 'Docker build'
running-workflow-name: 'Verify'
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-conclusions: success
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- name: Build Image
run: docker build . -f docker/Dockerfile -t ghcr.io/rainbowdashlabs/reputation-bot:${{ github.sha }}
- name: Login to Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io
- name: Push image
run: |
docker push ghcr.io/rainbowdashlabs/reputation-bot:${{ github.sha }}
- name: Tag & Push branch image
run: |
docker image tag ghcr.io/rainbowdashlabs/reputation-bot:${{ github.sha }} ghcr.io/rainbowdashlabs/reputation-bot:${{ github.ref_name }}
docker push ghcr.io/rainbowdashlabs/reputation-bot:${{ github.ref_name }}
- name: Tag & Push latest image
if: github.ref_name == 'main'
run: |
docker image tag ghcr.io/rainbowdashlabs/reputation-bot:${{ github.sha }} ghcr.io/rainbowdashlabs/reputation-bot:latest
docker push ghcr.io/rainbowdashlabs/reputation-bot:latest