Use aptitude over apt for resolving conflicts #63
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
# A single-shot build-n-pack on Alpine Linux | |
name: Publish Docker image | |
on: [push] | |
jobs: | |
push_to_registry: | |
name: Build Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check token is set | |
id: vars | |
shell: bash | |
run: | | |
unset HAS_SECRET | |
if [ -n $SECRET ]; then HAS_SECRET='true' ; fi | |
echo ::set-output name=HAS_SECRET_TOKEN::${HAS_SECRET} | |
env: | |
SECRET: "${{ secrets.DOCKER_TOKEN }}" | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
if: ${{ steps.vars.outputs.HAS_SECRET_TOKEN }} | |
- name: Convert username to lower case for docker | |
id: string_user | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository_owner }} | |
- name: Convert repo to lower case for docker | |
id: string_repo | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository }} | |
- name: Push to Docker Hub | |
uses: docker/build-push-action@v1 | |
if: ${{ steps.vars.outputs.HAS_SECRET_TOKEN }} | |
with: | |
username: ${{ steps.string_user.outputs.lowercase }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
registry: docker.io | |
repository: ${{ steps.string_repo.outputs.lowercase }} | |
tag_with_ref: true |