Skip to content

Build amc2moodle container #10

Build amc2moodle container

Build amc2moodle container #10

Workflow file for this run

name: 'Build amc2moodle container'
on:
push:
# branches:
# - 'master'
tags:
- 'v*'
jobs:
build:
name: 'Build amc2moodle container'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- id: docker-tag
uses: yuya-takeyama/docker-tag-from-github-ref-action@main
with:
latest-branches: 'main,master'
- name: "Build:checkout"
uses: actions/checkout@main
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@main
- name: Login to Github Packages
uses: docker/login-action@main
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
- name: 'Build:dockerimage'
id: docker_build
uses: docker/build-push-action@main
with:
# relative path to the place where source code with Dockerfile is located
context: ./docker
tags: ghcr.io/${{ github.repository_owner }}/amc2moodle:${{ steps.docker-tag.outputs.tag }},ghcr.io/${{ github.repository_owner }}/amc2moodle:latest
push: true
cache-from: type=gha
cache-to: type=gha
# # build on feature branches, push only on main branch
# push: ${{ github.ref == 'refs/heads/main' }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}