Cleaned up #32
This file contains hidden or 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: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ☁️ Login to GitHub Packages | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${{ secrets.USER_NAME }} --password-stdin | |
- name: ⚒️ Build the Docker image | |
run: docker build --build-arg USER_NAME=${{ secrets.USER_NAME }} --build-arg ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} . --file Dockerfile --tag inproder-eval:latest | |
- name: ❞ Tag the Docker image | |
run: docker tag inproder-eval:latest ghcr.io/${{ secrets.REPO_USER }}/inproder-eval:latest | |
- name: 📤 Push Docker image | |
run: docker push ghcr.io/${{ secrets.REPO_USER }}/inproder-eval:latest |