Skip to content

Update update-ghcr.yml #3

Update update-ghcr.yml

Update update-ghcr.yml #3

Workflow file for this run

name: Build and Push Docker Image to GHCR
on:
workflow_dispatch:
push:
branches: [ "main" ]
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
env:
BUILD_FILE: Dockerfile.base
BUILD_TAG: ros:noetic
IMAGE_TAG: ghcr.io/kth-sml/svea:x86_64
run: util/build
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Image to GHCR
run: docker push ghcr.io/kth-sml/svea:x86_64
- name: Log out from GitHub Container Registry
run: docker logout ghcr.io