Docker Version Release #3
Workflow file for this run
This file contains 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 Version Release | |
on: | |
create: | |
tags: | |
- v* | |
jobs: | |
docker-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build GH Container | |
run: | | |
docker login --username ${{ secrets.GH_USERNAME }} --password ${{ secrets.GH_TOKEN }} ghcr.io | |
docker build -t ghcr.io/drazzilb08/userscripts:${{ steps.get_version.outputs.VERSION }} | |
docker push ghcr.io/drazzilb08/userscripts:${{ steps.get_version.outputs.VERSION }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/userscripts:${{ steps.get_version.outputs.VERSION }} | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: CHANGELOG | |
token: ${{ secrets.GH_PAT }} | |
tag_name: ${{ steps.get_version.outputs.VERSION }} |