Skip to content

added arg for publishing with latest tag #6

added arg for publishing with latest tag

added arg for publishing with latest tag #6

name: Docker Hub Publish
on:
push:
branches: [ "main" ]
env:
IMAGE_NAME: asouchereau/vaultwarden-backup-gfs
jobs:
push_dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Get version
run: |
export VERSION=$(cat version.txt)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
echo "Version: $VERSION"
- name: Build and tag image
run: docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest .
- name: Push image to GHCR
run: docker push $IMAGE_NAME --all-tags